From: Maynard J. <may...@us...> - 2012-12-12 17:16:19
|
On 12/11/2012 01:41 PM, Maynard Johnson wrote: > On 12/10/2012 08:25 PM, Maynard Johnson wrote: >> Fix operf default unit mask handling Suravee, could you review this patch, please? Thanks! -Maynard >> >> 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 <may...@us...> >> --- >> pe_profiling/operf.cpp | 35 +++++++++++++++++++++++++++++------ >> 1 files changed, 29 insertions(+), 6 deletions(-) >> >> diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp >> index bf3e14f..45fcf5a 100644 > [snip] >> + cout << "mask is " << hex << mask << endl; > ^-- oops! I'll take that out when I commit the patch. > Christian, Don, if you can, please test this patch and give me your feedback. Any feedback on the patch code is welcome, too. > > Thanks, > -Maynard >> + config |= ((strtoull(mask, (char **) NULL, 10) & 0xFFULL) << 8); >> } else { >> config |= ((event->evt_um & 0xFFULL) << 8); >> } > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > oprofile-list mailing list > opr...@li... > https://lists.sourceforge.net/lists/listinfo/oprofile-list > |