lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH v4 41/48] perf stat: Correct check_per_pkg cpu
    From
    Code was incorrectly using the cpu map index as the CPU.

    Signed-off-by: Ian Rogers <irogers@google.com>
    ---
    tools/perf/util/stat.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
    index f7f9757eba23..86ab427e87fc 100644
    --- a/tools/perf/util/stat.c
    +++ b/tools/perf/util/stat.c
    @@ -292,11 +292,12 @@ static bool pkg_id_equal(const void *__key1, const void *__key2,
    return *key1 == *key2;
    }

    -static int check_per_pkg(struct evsel *counter,
    - struct perf_counts_values *vals, int cpu, bool *skip)
    +static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals,
    + int cpu_map_idx, bool *skip)
    {
    struct hashmap *mask = counter->per_pkg_mask;
    struct perf_cpu_map *cpus = evsel__cpus(counter);
    + int cpu = perf_cpu_map__cpu(cpus, cpu_map_idx);
    int s, d, ret = 0;
    uint64_t *key;

    --
    2.34.1.448.ga2b2bfdf31-goog
    \
     
     \ /
      Last update: 2022-01-05 07:17    [W:4.161 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site