[lkml]   [2017]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[Resend: Adding linux-kernel] tracing/kprobes: [Bug] Identical timestamps on two kprobes that are few instructions apart

I am trying to use kprobes to time a few kernel functions. However,
when I add two kprobes on a function that are a few instructions
apart, I sometimes get the same timestamp (measured in nano seconds)
on the two probes.

For example, if I add the two probes as follows,
1) perf probe -a "kprobe1=__schedule"
2) perf probe -a "kprobe2=__schedule+12"

I then use "perf record" on a multi-threaded benchmark (e.g. to collect samples. I then see the same
timestamp on kprobe1 and kprobe2 for the same thread running on the
same CPU. Following is an example of the output showing the same
timestamp on the two probes.


Since it happens intermittently, I am wondering if there is some sort
of race condition here. Please let me know if this is an expected
behavior or is there something wrong in the way I use kprobes.

Thank you,
- Arun

 \ /
  Last update: 2017-07-07 20:01    [W:0.032 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site