Skip to content

Commit c8b9358

Browse files
namhyungacmel
authored andcommitted
perf annotate: Treat 'call' instruction as stack operation
I found some portion of mem-store events sampled on CALL instruction which has no memory access. But it actually saves a return address into stack. It should be considered as a stack operation like RET instruction. Signed-off-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 332f60a commit c8b9358

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/util/annotate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,6 +2474,7 @@ static bool is_stack_operation(struct arch *arch, struct disasm_line *dl)
24742474
if (arch__is(arch, "x86")) {
24752475
if (!strncmp(dl->ins.name, "push", 4) ||
24762476
!strncmp(dl->ins.name, "pop", 3) ||
2477+
!strncmp(dl->ins.name, "call", 4) ||
24772478
!strncmp(dl->ins.name, "ret", 3))
24782479
return true;
24792480
}

0 commit comments

Comments
 (0)