mirror of
https://github.com/torvalds/linux.git
synced 2026-12-06 13:23:45 +00:00
perf evsel: Pass cpu not cpu map index to synthesize
evsel__write_stat_event() was incorrectly passing a cpu map index rather than a CPU to perf_event__synthesize_stat(). Signed-off-by: Ian Rogers <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Kan Liang <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Riccardo Mancini <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Suzuki Poulouse <[email protected]> Cc: Vineet Singh <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
472832d2c0
commit
7ac0089d13
@@ -327,10 +327,11 @@ static int write_stat_round_event(u64 tm, u64 type)
|
||||
|
||||
#define SID(e, x, y) xyarray__entry(e->core.sample_id, x, y)
|
||||
|
||||
static int evsel__write_stat_event(struct evsel *counter, u32 cpu, u32 thread,
|
||||
static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread,
|
||||
struct perf_counts_values *count)
|
||||
{
|
||||
struct perf_sample_id *sid = SID(counter, cpu, thread);
|
||||
struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread);
|
||||
int cpu = perf_cpu_map__cpu(evsel__cpus(counter), cpu_map_idx);
|
||||
|
||||
return perf_event__synthesize_stat(NULL, cpu, thread, sid->id, count,
|
||||
process_synthesized_event, NULL);
|
||||
|
||||
Reference in New Issue
Block a user