diff options
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 07da66511bd5..88b0353d4019 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -12,7 +12,9 @@ | |||
12 | static char const *script_name; | 12 | static char const *script_name; |
13 | static char const *generate_script_lang; | 13 | static char const *generate_script_lang; |
14 | 14 | ||
15 | static int default_start_script(const char *script __attribute((unused))) | 15 | static int default_start_script(const char *script __unused, |
16 | int argc __unused, | ||
17 | const char **argv __unused) | ||
16 | { | 18 | { |
17 | return 0; | 19 | return 0; |
18 | } | 20 | } |
@@ -22,7 +24,7 @@ static int default_stop_script(void) | |||
22 | return 0; | 24 | return 0; |
23 | } | 25 | } |
24 | 26 | ||
25 | static int default_generate_script(const char *outfile __attribute ((unused))) | 27 | static int default_generate_script(const char *outfile __unused) |
26 | { | 28 | { |
27 | return 0; | 29 | return 0; |
28 | } | 30 | } |
@@ -302,15 +304,8 @@ int cmd_trace(int argc, const char **argv, const char *prefix __used) | |||
302 | 304 | ||
303 | setup_scripting(); | 305 | setup_scripting(); |
304 | 306 | ||
305 | argc = parse_options(argc, argv, options, annotate_usage, 0); | 307 | argc = parse_options(argc, argv, options, annotate_usage, |
306 | if (argc) { | 308 | PARSE_OPT_STOP_AT_NON_OPTION); |
307 | /* | ||
308 | * Special case: if there's an argument left then assume tha | ||
309 | * it's a symbol filter: | ||
310 | */ | ||
311 | if (argc > 1) | ||
312 | usage_with_options(annotate_usage, options); | ||
313 | } | ||
314 | 309 | ||
315 | setup_pager(); | 310 | setup_pager(); |
316 | 311 | ||
@@ -350,7 +345,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __used) | |||
350 | } | 345 | } |
351 | 346 | ||
352 | if (script_name) { | 347 | if (script_name) { |
353 | err = scripting_ops->start_script(script_name); | 348 | err = scripting_ops->start_script(script_name, argc, argv); |
354 | if (err) | 349 | if (err) |
355 | goto out; | 350 | goto out; |
356 | } | 351 | } |