aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 12:01:39 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-02-08 12:01:39 -0500
commite3087b80aa0bceda9863f33307460f3ba79f2b15 (patch)
tree1e324754e5669a6038193b59c098b01d092f4e15 /tools/perf
parent124bb83cd7de4d851af7595650233fb9e9279d5d (diff)
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')
-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,
132 if (percent < min_pcnt) 132 if (percent < min_pcnt)
133 return -1; 133 return -1;
134 134
135 if (printed >= max_lines) 135 if (max_lines && printed >= max_lines)
136 return 1; 136 return 1;
137 137
138 color = get_percent_color(percent); 138 color = get_percent_color(percent);
@@ -154,7 +154,7 @@ static int objdump_line__print(struct objdump_line *oline,
154 color_fprintf(stdout, color, " %7.2f", percent); 154 color_fprintf(stdout, color, " %7.2f", percent);
155 printf(" : "); 155 printf(" : ");
156 color_fprintf(stdout, PERF_COLOR_BLUE, "%s\n", oline->line); 156 color_fprintf(stdout, PERF_COLOR_BLUE, "%s\n", oline->line);
157 } else if (printed >= max_lines) 157 } else if (max_lines && printed >= max_lines)
158 return 1; 158 return 1;
159 else { 159 else {
160 if (!*oline->line) 160 if (!*oline->line)