• Namhyung Kim's avatar
    perf stat: Add perf_stat_process_percore() · 1d6d2bea
    Namhyung Kim authored
    The perf_stat_process_percore() is to aggregate counts for an event per-core
    even if the aggr_mode is AGGR_NONE.  This is enabled when user requested it
    on the command line.
    
    To handle that, it keeps the per-cpu counts at first.  And then it aggregates
    the counts that have the same core id in the aggr->counts and updates the
    values for each cpu back.
    
    Later, per-core events will skip one of the CPUs unless percore-show-thread
    option is given.  In that case, it can simply print all cpu stats with the
    updated (per-core) values.
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Michael Petlan <mpetlan@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
    Link: https://lore.kernel.org/r/20221018020227.85905-17-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    1d6d2bea
stat.h 8.22 KB