perf tools: Demangle kernel and kernel module symbols too
hi,
Jan Stancek found test 1 breakage, probably caused by following patch:
950b8354716e perf tools: Demangle kernel and kernel module symbols too
it seems to break test 1:
---
[jolsa@krava perf]$ ./perf test -v 1
1: vmlinux symtab matches kallsyms :
--- start ---
test child forked, pid 6288
Looking at the vmlinux_path (6 entries long)
SNIP
0xffffffff8142dba0: diff name v: event_queue virtual table k: __vt_event_queue 0xffffffff8142dc00: diff name v: event_dequeue virtual table k: __vt_event_dequeue 0xffffffff8142dd90: diff name v: event_wait::isra::::part:: virtual table k: __vt_event_wait.isra.0.part.1
---
Avi,
could you please update the tests/vmlinux-kallsyms.c to reflect the demangle change?
thanks,
jirka
ping
Quoted 25 lines · Jiri Olsa
hi,
Jan Stancek found test 1 breakage, probably caused by following patch:
950b8354716eperf tools: Demangle kernel and kernel module symbols tooit seems to break test 1:
---
[jolsa@krava perf]$ ./perf test -v 1
1: vmlinux symtab matches kallsyms :
--- start ---
test child forked, pid 6288
Looking at thevmlinux_path(6 entries long)SNIP
0xffffffff8142dba0: diff name v:event_queuevirtual table k:__vt_event_queue0xffffffff8142dc00: diff name v:event_dequeuevirtual table k:__vt_event_dequeue0xffffffff8142dd90: diff name v: event_wait::isra::::part:: virtual table k: __vt_event_wait.isra.0.part.1
---Avi,
could you please update thetests/vmlinux-kallsyms.cto reflect the demangle change?thanks,
jirka
Quoted 14 lines · Jiri Olsa
hi,
Jan Stancek found test 1 breakage, probably caused by following patch:
950b8354716eperf tools: Demangle kernel and kernel module symbols tooit seems to break test 1:
---
[jolsa@krava perf]$ ./perf test -v 1
1: vmlinux symtab matches kallsyms :
--- start ---
test child forked, pid 6288
Looking at thevmlinux_path(6 entries long)SNIP
Quoted 10 lines
0xffffffff8142dba0: diff name v:event_queuevirtual table k:__vt_event_queue0xffffffff8142dc00: diff name v:event_dequeuevirtual table k:__vt_event_dequeue0xffffffff8142dd90: diff name v: event_wait::isra::::part:: virtual table k: __vt_event_wait.isra.0.part.1
---Avi,
could you please update thetests/vmlinux-kallsyms.cto reflect the demangle change?
It's not a simple matter of updating the test: the demangler interprets name beginning with __vt as C++ mangles names, which of course they aren't.
The only way I see to proceed is to make the demangling optional, default off.
Quoted 2 lines · Avi Kivity
It's not a simple matter of updating the test: the demangler interprets name beginning with
__vtas C++ mangles names, which of course they aren't.
Oh, that'll give cute 'problems' in a mixed C/C++ project that just happens to have __vt names in. Now of course I'm aware that C/C++ 'reserve' the __ prefix, which I suppose that makes it less likely in practise.
Quoted 2 lines
The only way I see to proceed is to make the demangling optional, default off.
Seems like a good way out, we could think about adding a language heuristic that tries and guess the target language and auto enables when it guesses C++, but that needs to have overrides as well.
Quoted 8 lines · Peter Zijlstra
Quoted 2 lines · Avi Kivity
It's not a simple matter of updating the test: the demangler interprets name beginning with
__vtas C++ mangles names, which of course they aren't.Oh, that'll give cute 'problems' in a mixed C/C++ project that just happens to have
__vtnames in. Now of course I'm aware that C/C++ 'reserve' the __ prefix, which I suppose that makes it less likely in practise.
If you have clashes there, perf demangling is the least of your worries.
Quoted 5 lines
Quoted 2 lines
The only way I see to proceed is to make the demangling optional, default off.
Seems like a good way out, we could think about adding a language heuristic that tries and guess the target language and auto enables when it guesses C++, but that needs to have overrides as well.
It should be easy to look for common C++ mangled name prefixes and use that as a guess, but I expect that users who profile C++ guest kernels (or kernel modules) are capable of adding the switch themselves.