Commit [e1ed25]  Maximize  Restore  History

Fix operf default unit mask handling

This patch addresses the problem reported to the oprofile-list having
subject heading of "other events than CPU_CLK_UNHALTED not working"

The operf tool mis-handles event specifications where the
unit mask is not specified, usually resulting in some bogus
config value that's passed to the perf_event_open call.
The end result is usually that opreport finds no samples.
In some cases, samples may be recorded, but they would
not be for the correct unit mask.

In lieu of applying this patch, the workaround for this bug is
to specify the default unit mask: e.g,
operf -e LLC_MISSES:6000:0x41 <my-app>

Signed-off-by: Maynard Johnson <>

Maynard Johnson Maynard Johnson 2013-01-02

changed pe_profiling/operf.cpp
pe_profiling/operf.cpp Diff Switch to side-by-side view

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

Sign up for the SourceForge newsletter:

No, thanks