https://bugzilla.suse.com/show_bug.cgi?id=1182888 Bug ID: 1182888 Summary: perf: Fix jump parsing for C++ code Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: jslaby@suse.com Reporter: jslaby@suse.com QA Contact: qa-bugs@suse.de CC: mliska@suse.cz Found By: --- Blocker: --- Considering the following testcase: int foo(int a, int b) { for (unsigned i = 0; i < 1000000000; i++) a += b; return a; } int main() { foo (3, 4); return 0; } perf annotate displays: 86.52 ���40055e: ��� ja 40056c <foo(int, int)+0x26> 13.37 ���400560: mov -0x18(%rbp),%eax ���400563: add %eax,-0x14(%rbp) ���400566: addl $0x1,-0x4(%rbp) 0.11 ���40056a: ��� jmp 400557 <foo(int, int)+0x11> ���40056c: mov -0x14(%rbp),%eax ���40056f: pop %rbp and the 'ja 40056c' does not link to the location in the function. It's caused by fact that comma is wrongly parsed, it's part of function signature. With my patch I see: 86.52 ��� ���������ja 26 13.37 ��� ��� mov -0x18(%rbp),%eax ��� ��� add %eax,-0x14(%rbp) ��� ��� addl $0x1,-0x4(%rbp) 0.11 ��� ������ jmp 11 ���26:���������mov -0x14(%rbp),%eax and 'o' output prints: 86.52 ���4005��������� ��� ja 40056c <foo(int, int)+0x26> 13.37 ���4005���0: mov -0x18(%rbp),%eax ���4005���3: add %eax,-0x14(%rbp) ���4005���6: addl $0x1,-0x4(%rbp) 0.11 ���4005���a: ��� jmp 400557 <foo(int, int)+0x11> ���4005��������� mov -0x14(%rbp),%eax On the contrary, compiling the very same file with gcc -x c, the parsing is fine because function arguments are not displyed: jmp 400543 <foo+0x1d> -- You are receiving this mail because: You are on the CC list for the bug.