summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 15:01:39 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 15:01:39 -0200
commite3087b80aa0bceda9863f33307460f3ba79f2b15 (patch)
tree1e324754e5669a6038193b59c098b01d092f4e15 /tools/perf/util/annotate.c
parent124bb83cd7de4d851af7595650233fb9e9279d5d (diff)
downloadblackbird-op-linux-e3087b80aa0bceda9863f33307460f3ba79f2b15.tar.gz
blackbird-op-linux-e3087b80aa0bceda9863f33307460f3ba79f2b15.zip
perf annotate: Fix --stdio rendering
The checks for not using a max_lines parameter were b0rked, problem introduced in 3653246. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 1012841835a3..6db435167d74 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -132,7 +132,7 @@ static int objdump_line__print(struct objdump_line *oline,
if (percent < min_pcnt)
return -1;
- if (printed >= max_lines)
+ if (max_lines && printed >= max_lines)
return 1;
color = get_percent_color(percent);
@@ -154,7 +154,7 @@ static int objdump_line__print(struct objdump_line *oline,
color_fprintf(stdout, color, " %7.2f", percent);
printf(" : ");
color_fprintf(stdout, PERF_COLOR_BLUE, "%s\n", oline->line);
- } else if (printed >= max_lines)
+ } else if (max_lines && printed >= max_lines)
return 1;
else {
if (!*oline->line)
OpenPOWER on IntegriCloud