Skip to contentSkip to conversation

perf list: Fix --raw-dump argument

PATCH Superseded Ramkumar Ramachandra 2 participants 4 messages Apr 11, 2014 perf events

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf list: Fix --raw-dump argument

While adding usage information, 44d742e (perf list: Add usage, 2013-10-30) broke

  $ perf list --raw-dump

Fix this by making raw-dump a subcommand.

Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/builtin-list.c     | 2 +-
 tools/perf/perf-completion.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-list.c +1 -1
index 011195e..c74aef5 100644
@@ -53,7 +53,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 			print_hwcache_events(NULL, false);
 		else if (strcmp(argv[i], "pmu") == 0)
 			print_pmu_events(NULL, false);
-		else if (strcmp(argv[i], "--raw-dump") == 0)
+		else if (strcmp(argv[i], "raw-dump") == 0)
 			print_events(NULL, true);
 		else {
 			char *sep = strchr(argv[i], ':'), *s;
tools/perf/perf-completion.sh +1 -1
index ae3a576..8f518f0 100644
@@ -119,7 +119,7 @@ __perf_main ()
 		fi
 	# List possible events for -e option
 	elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then
-		evts=$($cmd list --raw-dump)
+		evts=$($cmd list raw-dump)
 		__perfcomp_colon "$evts" "$cur"
 	# List subcommands for 'perf kvm'
 	elif [[ $prev == "kvm" ]]; then
Signature · 1 line
1.9.2.667.ge5b74e1
#1 lore raw
Quoted 6 lines · Ramkumar Ramachandra

While adding usage information, 44d742e (perf list: Add usage, 2013-10-30) broke

  $ perf list --raw-dump

Fix this by making raw-dump a subcommand.

you need to update perf-completion.sh now
also please add it to perf list man page as well

thanks,
jirka

Quoted 39 lines
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/builtin-list.c     | 2 +-
 tools/perf/perf-completion.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-list.c +1 -1
index 011195e..c74aef5 100644
@@ -53,7 +53,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
 			print_hwcache_events(NULL, false);
 		else if (strcmp(argv[i], "pmu") == 0)
 			print_pmu_events(NULL, false);
-		else if (strcmp(argv[i], "--raw-dump") == 0)
+		else if (strcmp(argv[i], "raw-dump") == 0)
 			print_events(NULL, true);
 		else {
 			char *sep = strchr(argv[i], ':'), *s;
tools/perf/perf-completion.sh +1 -1
index ae3a576..8f518f0 100644
@@ -119,7 +119,7 @@ __perf_main ()
 		fi
 	# List possible events for -e option
 	elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then
-		evts=$($cmd list --raw-dump)
+		evts=$($cmd list raw-dump)
 		__perfcomp_colon "$evts" "$cur"
 	# List subcommands for 'perf kvm'
 	elif [[ $prev == "kvm" ]]; then
Signature · 1 line
1.9.2.667.ge5b74e1
#2 lore raw
Quoted 2 lines · Jiri Olsa

you need to update perf-completion.sh now
also please add it to perf list man page as well

I updated perf-completion.sh, although I didn't mention it in the commit message. I'll add it to the perf-list man page and send out another version.

Ram

#3 lore raw
Quoted 7 lines · Ramkumar Ramachandra
Quoted 2 lines · Jiri Olsa

you need to update perf-completion.sh now
also please add it to perf list man page as well

I updated perf-completion.sh, although I didn't mention it in the commit message. I'll add it to the perf-list man page and send out another version.

ugh, I'm getting blind.. sry :-\

thanks,
jirka