diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 5e2f47f88ec6..642a6d8eb5dc 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -343,7 +343,7 @@ static int | |||
343 | parse_callchain_opt(const struct option *opt __used, const char *arg, | 343 | parse_callchain_opt(const struct option *opt __used, const char *arg, |
344 | int unset) | 344 | int unset) |
345 | { | 345 | { |
346 | char *tok; | 346 | char *tok, *tok2; |
347 | char *endptr; | 347 | char *endptr; |
348 | 348 | ||
349 | /* | 349 | /* |
@@ -388,10 +388,13 @@ parse_callchain_opt(const struct option *opt __used, const char *arg, | |||
388 | if (!tok) | 388 | if (!tok) |
389 | goto setup; | 389 | goto setup; |
390 | 390 | ||
391 | tok2 = strtok(NULL, ","); | ||
391 | callchain_param.min_percent = strtod(tok, &endptr); | 392 | callchain_param.min_percent = strtod(tok, &endptr); |
392 | if (tok == endptr) | 393 | if (tok == endptr) |
393 | return -1; | 394 | return -1; |
394 | 395 | ||
396 | if (tok2) | ||
397 | callchain_param.print_limit = strtod(tok2, &endptr); | ||
395 | setup: | 398 | setup: |
396 | if (register_callchain_param(&callchain_param) < 0) { | 399 | if (register_callchain_param(&callchain_param) < 0) { |
397 | fprintf(stderr, "Can't register callchain params\n"); | 400 | fprintf(stderr, "Can't register callchain params\n"); |