From: Maynard J. <may...@us...> - 2012-12-06 15:38:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "oprofile". The branch, master has been updated via e226845690f450d7bc0f6bc676f2fb026a94a0eb (commit) from ca6d916a6f8f0f8abbb4c9b6a97dd1a1615bb124 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e226845690f450d7bc0f6bc676f2fb026a94a0eb Author: Carl Love <ce...@us...> Date: Thu Dec 6 09:23:25 2012 -0600 Oprofile operf: Fix the code to strip the _GRP## from the event name The current code uses the call "strstr(event.name, "_GRP")" to find the substring for the group number at the end of the POWER events. The strstr() function finds the first occurance of the substring processing from left to right. This will find the string "_GRP_" in the name of the event rather then the intended _GRP## at the end of the string. For example the event name "PM_GRP_CMPL_GRP174" is currently change to "PM" instead of "PM_GRP_CMPL". This patch makes a change in the calculation for the strncpy() call to use the function rfind("_GRP") to return the index of where the last instance of the substring is found. Basically the call finds the first occurance of the substring by searching from right to left. Signed-off-by: Carl Love <ce...@us...> ----------------------------------------------------------------------- Summary of changes: libperf_events/operf_utils.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- oprofile |