#203 Problems with daemonrc cached event list


opcontrol caches the oprofile events in /root/.oprofile/daemonrc. If someone explicitly sets the events like this:

opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog
opcontrol --start --event=CPU_CLK_UNHALTED:1000000:0:1:1
opcontrol --shutdown

There will be an entry in /root/.oprofile/daemonrc for the event:


This presents a problem if one tries to use the timer mode:

opcontrol --deinit
modprobe oprofile timer=1
opcontrol --start

Get the following error message:

You cannot specify any performance counter events
because OProfile is in timer mode.

Get rid of the daemonrc file and oprofile starts up:

# rm /root/.oprofile/daemonrc
# opcontrol --start --no-vmlinux
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.

OProfile should be better about the caches list of events in daemonrc.


  • Maynard Johnson

    Maynard Johnson - 2011-12-06

    Will, please take a look at the s390 patch that was posted today. Check out the change made to opcontrol, context line # 421 (pasted below for convenience). That change seems to fix the problem described in this bug report.

    + # Ignore configured events when running in timer mode.
    + if test "$IS_TIMER" = 1; then
    + NR_CHOSEN=0
    + fi

  • Maynard Johnson

    Maynard Johnson - 2012-07-06
    • status: open --> open-fixed
  • Maynard Johnson

    Maynard Johnson - 2012-07-06

    Marking as Fixed (see my 2011-12-06 comment).

  • Maynard Johnson

    Maynard Johnson - 2012-08-27
    • status: open-fixed --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks