Messages in this thread Patch in this message | | | From | Dongsheng Yang <> | Subject | [PATCH 1/6] perf tools: Add long_name for call-graph option. | Date | Thu, 12 Dec 2013 15:39:25 -0500 |
| |
I am not sure why the -g option in record and top has no long_name for it.
Example: # perf record --[TAB] --all-cpus --count --freq --no-delay --period --realtime --uid --branch-any --cpu --group --no-inherit --per-thread --stat --verbose --branch-filter --data --mmap-pages --no-samples --pid --tid --weight --call-graph --event --no-buildid --(null) --quiet --timestamp --cgroup --filter --no-buildid-cache --output --raw-samples --transaction
There is a --(null) here, it is not clear enough to user.
This patch add a "call-graph" long_name for it.
Verification: # perf record --[TAB] --all-cpus --count --freq --no-delay --per-thread --stat --verbose --branch-any --cpu --group --no-inherit --pid --tid --weight --branch-filter --data --mmap-pages --no-samples --quiet --timestamp --call-graph --event --no-buildid --output --raw-samples --transaction --cgroup --filter --no-buildid-cache --period --realtime --uid
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> --- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-top.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index c1c1200..7460c8f 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -844,7 +844,7 @@ const struct option record_options[] = { perf_evlist__parse_mmap_pages), OPT_BOOLEAN(0, "group", &record.opts.group, "put the counters into a counter group"), - OPT_CALLBACK_NOOPT('g', NULL, &record.opts, + OPT_CALLBACK_NOOPT('g', "call-graph", &record.opts, NULL, "enables call-graph recording" , &record_callchain_opt), OPT_CALLBACK(0, "call-graph", &record.opts, diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 03d37a7..a734a1b 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1084,7 +1084,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) " abort, in_tx, transaction"), OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, "Show a column with the number of samples"), - OPT_CALLBACK_NOOPT('g', NULL, &top.record_opts, + OPT_CALLBACK_NOOPT('g', "call-graph", &top.record_opts, NULL, "enables call-graph recording", &callchain_opt), OPT_CALLBACK(0, "call-graph", &top.record_opts, -- 1.8.2.1
| |