• Jin Yao's avatar
    perf tools: Add a 'percore' event qualifier · 064b4e82
    Jin Yao authored
    Add a 'percore' event qualifier, like cpu/event=0,umask=0x3,percore=1/,
    that sums up the event counts for both hardware threads in a core.
    
    We can already do this with --per-core, but it's often useful to do
    this together with other metrics that are collected per hardware thread.
    So we need to support this per-core counting on a event level.
    
    This can be implemented in only the user tool, no kernel support needed.
    
     v4:
     ---
     1. Add Arnaldo's patch which updates the documentation for
        this new qualifier.
     2. Rebase to latest perf/core branch
    
     v3:
     ---
     Simplify the code according to Jiri's comments.
     Before:
       "return term->val.percore ? true : false;"
     Now:
       "return term->val.percore;"
    
     v2:
     ---
     Change the qualifier name from 'coresum' to 'percore' according to
     comments from Jiri and Andi.
    Signed-off-by: default avatarJin Yao <yao.jin@linux.intel.com>
    Tested-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jin Yao <yao.jin@intel.com>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1555077590-27664-2-git-send-email-yao.jin@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    064b4e82
parse-events.c 66.7 KB