perf annotate: Fix annotate context lines regression
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 8 Feb 2011 17:29:25 +0000 (15:29 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 8 Feb 2011 17:29:25 +0000 (15:29 -0200)
commitd5e3d747007fdb541e57ed72e020ff0b94db3470
tree96dc1bf70895e24f3b85f44ee03cd0896105762a
parentce6f4fab4059cd72638a0cfa596a8ee2c79c1c8e
perf annotate: Fix annotate context lines regression

The live annotation done in 'perf top' needs to limit the context before
lines that aren't filtered out by the min percent filter, if we don't do
that, the screen in a tty often is not enough for showing what is
interesting: lines with hits and a few source code lines before it.

Reported-by: Mike Galbraith <efault@gmx.de>
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>
tools/perf/builtin-top.c
tools/perf/util/annotate.c
tools/perf/util/annotate.h