Commit 6668a961 authored by Augusto Caringi's avatar Augusto Caringi Committed by Matheus Marchini

List tracepoints when search expression is empty (#270)

The 'bpftrace -l' command (without any search expression) should also
list the tracepoints, in the same way of 'bpftrace -l '*''.
parent c49b333c
......@@ -90,8 +90,13 @@ void list_probes(const std::string &search)
if (events[j] == "." || events[j] == ".." || events[j] == "enable" || events[j] == "filter")
continue;
probe = "tracepoint:" + cats[i] + ":" + events[j];
if (search_probe(probe, search))
continue;
if (!search.empty())
{
if (search_probe(probe, search))
continue;
}
std::cout << probe << std::endl;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment