diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2012-04-24 14:24:28 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-04-24 14:24:28 -0300 |
commit | a3f895be1f1ed17f66e6e71adeef0cc7f937512c (patch) | |
tree | 167a39caa601782726a483d977e9e4150d5fb3a7 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 59d038d591f7f00e6752cbfadbbc1c0ca318c5c0 (diff) |
perf annotate browser: Initial loop detection
Simple algorithm, just look for the next backward jump that points to
before the cursor.
Then draw an arrow connecting the jump to its target.
Do this as you move the cursor, entering/exiting possible loops.
Ex (graph chars replaced to avoid mail encoding woes):
avc_has_perm_flags
0.00 | nopl 0x0(%rax)
5.36 |+-> 68: mov (%rax),%rax
5.15 || test %rax,%rax
0.00 || v je 130
2.96 || 74: cmp -0x20(%rax),%ebx
47.38 || lea -0x20(%rax),%rcx
0.28 || ^ jne 68
3.16 || cmp -0x18(%rax),%dx
0.00 |+------^ jne 68
4.92 | cmp 0x4(%rcx),%r13d
0.00 | v jne 68
1.15 | test %rcx,%rcx
0.00 | v je 130
Suggested-by: Linus Torvalds <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions