Howto make perf probe work
Hi all,
Is there any way to use perf probe to add new tracepoint like pagefault enter/exit?
When I type perf probe fault:10
I always get the error as follow:
Debuginfo-analysis is not supported.
Error: Failed to add events. (-38)
What exactly i miss to get the perf probe work correctly?
Best,
Chen
2013-04-01
zhengchen
A message that is not in the archive (sent off-list or not yet received): CAGJbQddYW4-QZUvGpwCbmVhsvGEan5UkgRbXq+w4i+9Ob9vUrw@mail.gmail.com
Quoted 4 lines
HI,
Please enablekprobe_eventconfig option in the kernel and build the same and boot the board using it. Then please try to add event using perf probe command
Thanks very much for your reply, and I already enable DEBUG_KPROBE_EVENT in kernel. I did success in "perf probe handle_mm_fault".
But when i want to to "perf probe" other Kernel symbol, such as do_page_fault.
I came across other problems:
Added new event:
Failed to write event: Invalid argument
Error: Failed to add events. (-1)
And when i type perf probe page_fault_entry:
Kernel symbol 'page_fault_entry' not found.
Error: Failed to add events. (-2)
Please notice that "do_page_fault" and "page_fault_entry" are all Kernel symbols, which canbe find in "/proc/kallsyms", but not recorgonized by perf (or even kprobe). Any idea for that?
Best,
Chen
Quoted 10 lines
Quoted 10 lines · OSDepend
Hi all,
Is there any way to use perf probe to add new tracepoint like pagefault enter/exit? When I type perf probe fault:10
I always get the error as follow:
Debuginfo-analysis is not supported.
Error: Failed to add events. (-38)
What exactly i miss to get the perf probe work correctly?
Best,
Chen
Quoted 4 lines
HI,
Please enablekprobe_eventconfig option in the kernel and build the same and boot the board using it. Then please try to add event using perf probe command
Thanks very much for your reply, and I already enable DEBUG_KPROBE_EVENT in kernel. I did success in "perf probe handle_mm_fault".
But when i want to to "perf probe" other Kernel symbol, such as do_page_fault.
I came across other problems:
Added new event:
Failed to write event: Invalid argument
Error: Failed to add events. (-1)
And when i type perf probe page_fault_entry:
Kernel symbol 'page_fault_entry' not found.
Error: Failed to add events. (-2)
Please notice that "do_page_fault" and "page_fault_entry" are all Kernel symbols, which canbe find in "/proc/kallsyms", but not recorgonized by perf (or even kprobe). Any idea for that?
Best,
Chen
Quoted 10 lines
Quoted 10 lines · OSDepend
Hi all,
Is there any way to use perf probe to add new tracepoint like pagefault enter/exit? When I type perf probe fault:10
I always get the error as follow:
Debuginfo-analysis is not supported.
Error: Failed to add events. (-38)
What exactly i miss to get the perf probe work correctly?
Best,
Chen
Quoted 8 lines
Quoted 4 lines
HI,
Please enablekprobe_eventconfig option in the kernel and build the same and boot the board using it. Then please try to add event using perf probe commandThanks very much for your reply, and I already enable
DEBUG_KPROBE_EVENTin kernel. I did success in "perf probehandle_mm_fault".
Quoted 10 lines
But when i want to to "perf probe" other Kernel symbol, such as
do_page_fault.
I came across other problems:
Added new event:
Failed to write event: Invalid argument
Error: Failed to add events. (-1)
And when i type perf probepage_fault_entry:
Kernel symbol 'page_fault_entry' not found.
Error: Failed to add events. (-2)
Please notice that "do_page_fault" and "page_fault_entry" are all Kernel symbols, which canbe find in "/proc/kallsyms", but not recorgonized by perf (or even kprobe). Any idea for that?
For some reason, do_page_fault() is marked as __kprobe on some arch which means it cannot be probed.
Thanks,
Namhyung
Hi Kim,
Quoted 18 lines
Quoted 8 lines
Quoted 4 lines
HI,
Please enablekprobe_eventconfig option in the kernel and build the same and boot the board using it. Then please try to add event using perf probe commandThanks very much for your reply, and I already enable
DEBUG_KPROBE_EVENTin kernel. I did success in "perf probehandle_mm_fault".Quoted 10 lines
But when i want to to "perf probe" other Kernel symbol, such as
do_page_fault.
I came across other problems:
Added new event:
Failed to write event: Invalid argument
Error: Failed to add events. (-1)
And when i type perf probepage_fault_entry:
Kernel symbol 'page_fault_entry' not found.
Error: Failed to add events. (-2)
Please notice that "do_page_fault" and "page_fault_entry" are all Kernel symbols, which canbe find in "/proc/kallsyms", but not recorgonized by perf (or even kprobe). Any idea for that?
Quoted 4 lines
For some reason,
do_page_fault()is marked as__kprobeon some arch which means it cannot be probed.
Thanks,
Namhyung
My kernel is runing on X86_64 arch, is there any chance for me to get the do_page_fault() entry/exit work? Or How can i add a exit tracepoint for handle_mm_fault()? so I can calculate the latency of that fault handle function?
Best,
Chen
Hi,
On Tue, 2 Apr 2013 17:11:01 +0800,
Quoted 4 lines
Quoted 2 lines
For some reason,
do_page_fault()is marked as__kprobeon some arch which means it cannot be probed.My kernel is runing on
X86_64arch, is there any chance for me to get thedo_page_fault()entry/exit work?
nope, AFAIK.
Quoted 1 line
Or How can i add a exit tracepoint for
handle_mm_fault()? so I can calculate the latency of that fault handle function?
Try "perf probe -a entry=handle_mm_fault -a exit=handle_mm_fault%return"
Thanks,
Namhyung
Hi,
Quoted 3 lines
Quoted 1 line
Or How can i add a exit tracepoint for
handle_mm_fault()? so I can calculate the latency of that fault handle function?Try "perf probe -a entry=handle_mm_fault -a exit=handle_mm_fault%return"
That's works nicely for me!
Thanks a lot!!
Quoted 6 lines
On Tue, 2 Apr 2013 17:11:01 +0800,
Quoted 4 lines
Quoted 2 lines
For some reason,
do_page_fault()is marked as__kprobeon some arch which means it cannot be probed.My kernel is runing on
X86_64arch, is there any chance for me to get thedo_page_fault()entry/exit work?nope, AFAIK.
Is there any guide for us to decide which tracepoint (or other kernel symbol) canbe used, and which cannot? For some of the kallsyms cannot be used directly. Such as do_raw_spin_lock.
perf probe -a test=do_raw_spin_lock
Fatal: Kernel symbol 'do_raw_spin_lock' not found - probe not added.
Best,
Chen
Hi,
Quoted 10 lines · OSDepend
Quoted 6 lines · OSDepend
Quoted 4 lines
Quoted 2 lines
For some reason,
do_page_fault()is marked as__kprobeon some arch which means it cannot be probed.My kernel is runing on
X86_64arch, is there any chance for me to get thedo_page_fault()entry/exit work?nope, AFAIK.
Is there any guide for us to decide which tracepoint (or other kernel symbol) canbe used, and which cannot? For some of the kallsyms cannot be used directly. Such as
do_raw_spin_lock.
perf probe -a test=do_raw_spin_lock
Fatal: Kernel symbol 'do_raw_spin_lock' not found - probe not added.
Hmm.. it seems not, currently.
Maybe we can change perf to output the symbol was not able to be probed after checking symbol address and it's between __kprobes_text_{start,end}.
I'll take a look at it later.
Thanks,
Namhyung