Skip to contentSkip to conversation

perf tools: Add OPT_END to option array of perf-trace

PATCH Applied Masami Hiramatsu 2 participants 3 messages Aug 21, 2009 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tools: Add OPT_END to option array of perf-trace

Add OPT_END to option array of perf-trace for fixing a SEGV bug when showing perf-trace help message.

Without this patch;
./perf trace -h

usage: perf trace [<options>] <command>

-D, --dump-raw-trace dump raw trace in ASCII
-v, --verbose be more verbose (show symbol address, etc)
-f, Segmentation fault

With this patch:
./perf trace -h

usage: perf trace [<options>] <command>

-D, --dump-raw-trace dump raw trace in ASCII
-v, --verbose be more verbose (show symbol address, etc)

Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Xiao Guangrong <[email protected]>
Cc Zhaolei <[email protected]>
Cc Li Zefan <[email protected]>
Cc Lai Jiangshan <[email protected]>
Cc Tom Zanussi <[email protected]>

---

 tools/perf/builtin-trace.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/builtin-trace.c +1 -0
index 88eef71..dd3c2e7 100644
@@ -257,6 +257,7 @@ static const struct option options[] = {
 		    "dump raw trace in ASCII"),
 	OPT_BOOLEAN('v', "verbose", &verbose,
 		    "be more verbose (show symbol address, etc)"),
+	OPT_END()
 };
 
 int cmd_trace(int argc, const char **argv, const char *prefix __used)
Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
Applied
#1 lore raw
Quoted 2 lines · Masami Hiramatsu

Add OPT_END to option array of perf-trace for fixing a SEGV bug when showing perf-trace help message.

applied, thanks!

Ingo

#2 lore raw

[tip:perfcounters/tracing] perf trace: Add OPT_END to option array of perf-trace

In reply to Masami Hiramatsu
Commit-ID:  1909629fb1ec9800cf2cb0091870d6a1c1ca665f
Gitweb:     http://git.kernel.org/tip/1909629fb1ec9800cf2cb0091870d6a1c1ca665f
Author:     Masami Hiramatsu <[email protected]>
AuthorDate: Fri, 21 Aug 2009 14:56:03 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 21 Aug 2009 21:42:43 +0200

perf trace: Add OPT_END to option array of perf-trace

Add OPT_END to option array of perf-trace for fixing a SEGV bug when showing perf-trace help message.

Without this patch;
./perf trace -h

usage: perf trace [<options>] <command>

-D, --dump-raw-trace dump raw trace in ASCII
-v, --verbose be more verbose (show symbol address, etc)
-f, Segmentation fault

With this patch:
./perf trace -h

usage: perf trace [<options>] <command>

-D, --dump-raw-trace dump raw trace in ASCII
-v, --verbose be more verbose (show symbol address, etc)

Cc systemtap <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Xiao Guangrong <[email protected]>
Cc Zhaolei <[email protected]>
Cc Li Zefan <[email protected]>
Cc Lai Jiangshan <[email protected]>
Cc Tom Zanussi <[email protected]>

LKML-Reference: <[email protected]>

---
 tools/perf/builtin-trace.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/builtin-trace.c +1 -0
index 88eef71..dd3c2e7 100644
@@ -257,6 +257,7 @@ static const struct option options[] = {
 		    "dump raw trace in ASCII"),
 	OPT_BOOLEAN('v', "verbose", &verbose,
 		    "be more verbose (show symbol address, etc)"),
+	OPT_END()
 };
 
 int cmd_trace(int argc, const char **argv, const char *prefix __used)