lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Dec 2013 15:39:25 -0500
From:	Dongsheng Yang <yangds.fnst@...fujitsu.com>
To:	acme@...hat.com, dsahern@...il.com
Cc:	linux-kernel@...r.kernel.org,
	Dongsheng Yang <yangds.fnst@...fujitsu.com>
Subject: [PATCH 1/6] perf tools: Add long_name for call-graph option.

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@...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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ