aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:20:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:20:11 -0400
commitade0899b298ba2c43bfd6abd8cbc2545944cde0c (patch)
treea448dfb440b3b958b6306bb43620cd5d76f504bf /tools/perf/builtin-probe.c
parent871a0596cb2f51b57dc583d1a7c4be0186582fe7 (diff)
parent95cf59ea72331d0093010543b8951bb43f262cac (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar: "This tree includes some late late perf items that missed the first round: tools: - Bash auto completion improvements, now we can auto complete the tools long options, tracepoint event names, etc, from Namhyung Kim. - Look up thread using tid instead of pid in 'perf sched'. - Move global variables into a perf_kvm struct, from David Ahern. - Hists refactorings, preparatory for improved 'diff' command, from Jiri Olsa. - Hists refactorings, preparatory for event group viewieng work, from Namhyung Kim. - Remove double negation on optional feature macro definitions, from Namhyung Kim. - Remove several cases of needless global variables, on most builtins. - misc fixes kernel: - sysfs support for IBS on AMD CPUs, from Robert Richter. - Support for an upcoming Intel CPU, the Xeon-Phi / Knights Corner HPC blade PMU, from Vince Weaver. - misc fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) perf: Fix perf_cgroup_switch for sw-events perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu perf/AMD/IBS: Add sysfs support perf hists: Add more helpers for hist entry stat perf hists: Move he->stat.nr_events initialization to a template perf hists: Introduce struct he_stat perf diff: Removing the total_period argument from output code perf tool: Add hpp interface to enable/disable hpp column perf tools: Removing hists pair argument from output path perf hists: Separate overhead and baseline columns perf diff: Refactor diff displacement possition info perf hists: Add struct hists pointer to struct hist_entry perf tools: Complete tracepoint event names perf/x86: Add support for Intel Xeon-Phi Knights Corner PMU perf evlist: Remove some unused methods perf evlist: Introduce add_newtp method perf kvm: Move global variables into a perf_kvm struct perf tools: Convert to BACKTRACE_SUPPORT perf tools: Long option completion support for each subcommands perf tools: Complete long option names of perf command ...
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 118aa8946573..de38a034b129 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -250,19 +250,20 @@ static int opt_set_filter(const struct option *opt __maybe_unused,
250 return 0; 250 return 0;
251} 251}
252 252
253static const char * const probe_usage[] = { 253int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
254 "perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]", 254{
255 "perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]", 255 const char * const probe_usage[] = {
256 "perf probe [<options>] --del '[GROUP:]EVENT' ...", 256 "perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]",
257 "perf probe --list", 257 "perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]",
258 "perf probe [<options>] --del '[GROUP:]EVENT' ...",
259 "perf probe --list",
258#ifdef DWARF_SUPPORT 260#ifdef DWARF_SUPPORT
259 "perf probe [<options>] --line 'LINEDESC'", 261 "perf probe [<options>] --line 'LINEDESC'",
260 "perf probe [<options>] --vars 'PROBEPOINT'", 262 "perf probe [<options>] --vars 'PROBEPOINT'",
261#endif 263#endif
262 NULL 264 NULL
263}; 265};
264 266 const struct option options[] = {
265static const struct option options[] = {
266 OPT_INCR('v', "verbose", &verbose, 267 OPT_INCR('v', "verbose", &verbose,
267 "be more verbose (show parsed arguments, etc)"), 268 "be more verbose (show parsed arguments, etc)"),
268 OPT_BOOLEAN('l', "list", &params.list_events, 269 OPT_BOOLEAN('l', "list", &params.list_events,
@@ -325,10 +326,7 @@ static const struct option options[] = {
325 OPT_CALLBACK('x', "exec", NULL, "executable|path", 326 OPT_CALLBACK('x', "exec", NULL, "executable|path",
326 "target executable name or path", opt_set_target), 327 "target executable name or path", opt_set_target),
327 OPT_END() 328 OPT_END()
328}; 329 };
329
330int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
331{
332 int ret; 330 int ret;
333 331
334 argc = parse_options(argc, argv, options, probe_usage, 332 argc = parse_options(argc, argv, options, probe_usage,