1

I am new to BPF and perf, I am using

perf record -F 150 -g -p $(pidof  app_name)  -- sleep  60

to profiling a pub sub based app, the publisher side is around 100HZ. and flamegraph is dominated by perf_event, which I think it is related to the tracing. My question:

  1. is this normal ? I perf-ed other toy example(non-pub-sub), which does not have this kind of overhead showing up.
  2. what is the tuning trick I can do to perf my own app ? without showing the overhead of the perf itself ?

enter image description here

enter image description here

baltam
  • 53
  • 5
  • 1
    This seems a bit weird. I'd expect `-p` to filter out the perf process. Are you sure your application doesn't use perf events in some way? – pchaigno Apr 17 '21 at 12:28
  • I am sure the app I am trying to profile does not contains any perf related work. I have impression that kernel tracing's overhead is around 5%, and this is clearly more than 5%. – baltam Apr 17 '21 at 22:32
  • See also https://stackoverflow.com/questions/66515594/why-does-native-write-msr-dominate-my-profiling-result - it seems that this happens regularly with futex_wait, and may be a glitch. – nnnmmm May 31 '21 at 07:51

0 Answers0