diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 9e4004b08f559222641fdd2067eaeee06a3aeef9..f9dff652dcbdb01854ad8478c2218acc5caaf2ae 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -241,7 +241,7 @@ static int process_read_event(struct perf_tool *tool, const char *name = evsel ? perf_evsel__name(evsel) : "unknown"; int err = perf_read_values_add_value(&rep->show_threads_values, event->read.pid, event->read.tid, - event->read.id, + evsel->idx, name, event->read.value); diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c index 3b56aeaa8cbb5ceba357a4baa99c1446b186500e..8a32bb0095e5e61616319c4145124948f9bfb21c 100644 --- a/tools/perf/util/values.c +++ b/tools/perf/util/values.c @@ -192,7 +192,7 @@ int perf_read_values_add_value(struct perf_read_values *values, if (cindex < 0) return cindex; - values->value[tindex][cindex] = value; + values->value[tindex][cindex] += value; return 0; }