Skip to content

Commit

Permalink
perf annotate: Fix --stdio rendering
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Feb 8, 2011
1 parent 124bb83 commit e3087b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit e3087b8

Please sign in to comment.