SourceForge has been redesigned. Learn more.

#262 operf kernel throttling detection is broken


With oprofile 0.9.8, the operf command below produces the following output on an Intel Core 2 Duo/RHEL 6.4 system:

[maynard@oc3431575272 test-stuff]$ operf -e CPU_CLK_UNHALTED:20000 ./memcpyt 200000000
operf: Profiler started
Num iterations passed is 200000000
memcpyt starting with PID 2423
source_address:  7fff689b7003
dest_address:  7fff689b5007
 200000000 interations of memcpy(d+7.s+3,65) requires       10.016 seconds
* * * * WARNING: Profiling rate was throttled back by the kernel * * * *
The number of samples actually recorded is less than expected, but is
probably still statistically valid.  Decreasing the sampling rate is the
best option if you want to avoid throttling.

Profiling done.

The same operf command using current upstream oprofile produces no throttling message. But by comparing the number of samples with profile runs using a lower sampling rate (i.e., count value >=100000 for CPU_CLK_UNHALTED), I can see that the kernel must be throttling, because we're not collecting enough samples for the given sampling rate.


  • Maynard Johnson

    Maynard Johnson - 2013-12-17

    To clarify, the behavior of 0.9.8 oprofile correctly produces the throttling message. The current upstream code is incorrect in that it does not produce a throttling message under this high sampling rate condition.

  • Maynard Johnson

    Maynard Johnson - 2013-12-18
    • assigned_to: Carl Love --> Maynard Johnson
    • Group: -->
  • Maynard Johnson

    Maynard Johnson - 2013-12-18

    Additionally, the opreport command should report when throttling has occurred for the profile data being analyzed. This enhancement was made post-0.9.8, but was broken at some point before 0.9.9 was released, so that this informational message is also now missing from opreport.

  • Carl Love

    Carl Love - 2013-12-18

    I reviewed the patch, applied it and tested it. The patch fixed the issues. Looks good.

  • Maynard Johnson

    Maynard Johnson - 2013-12-18
    • status: open --> open-fixed
  • Maynard Johnson

    Maynard Johnson - 2013-12-18

    Patch committed.

  • Maynard Johnson

    Maynard Johnson - 2014-09-11
    • Status: open-fixed --> closed

Log in to post a comment.