diff options
| author | Peter Zijlstra <[email protected]> | 2010-03-03 13:12:23 +0100 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2010-03-10 13:23:32 +0100 |
| commit | ef21f683a045a79b6aa86ad81e5fdfc0d5ddd250 (patch) | |
| tree | ccf39f5051608c1eccac9171259c2d7bc381cc96 /include/linux/debugobjects.h | |
| parent | caff2befffe899e63df5cc760b7ed01cfd902685 (diff) | |
perf, x86: use LBR for PEBS IP+1 fixup
Use the LBR to fix up the PEBS IP+1 issue.
As said, PEBS reports the next instruction, here we use the LBR to find
the last branch and from that construct the actual IP. If the IP matches
the LBR-TO, we use LBR-FROM, otherwise we use the LBR-TO address as the
beginning of the last basic block and decode forward.
Once we find a match to the current IP, we use the previous location.
This patch introduces a new ABI element: PERF_RECORD_MISC_EXACT, which
conveys that the reported IP (PERF_SAMPLE_IP) is the exact instruction
that caused the event (barring CPU errata).
The fixup can fail due to various reasons:
1) LBR contains invalid data (quite possible)
2) part of the basic block got paged out
3) the reported IP isn't part of the basic block (see 1)
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: "Zhang, Yanmin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions