summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r--tools/perf/builtin-stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 352cf39d7c2f..7b9c26f9cf34 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -287,7 +287,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
287 * The leader's group read loads data into its group members 287 * The leader's group read loads data into its group members
288 * (via perf_evsel__read_counter) and sets threir count->loaded. 288 * (via perf_evsel__read_counter) and sets threir count->loaded.
289 */ 289 */
290 if (!count->loaded && 290 if (!perf_counts__is_loaded(counter->counts, cpu, thread) &&
291 read_single_counter(counter, cpu, thread, rs)) { 291 read_single_counter(counter, cpu, thread, rs)) {
292 counter->counts->scaled = -1; 292 counter->counts->scaled = -1;
293 perf_counts(counter->counts, cpu, thread)->ena = 0; 293 perf_counts(counter->counts, cpu, thread)->ena = 0;
@@ -295,7 +295,7 @@ static int read_counter(struct perf_evsel *counter, struct timespec *rs)
295 return -1; 295 return -1;
296 } 296 }
297 297
298 count->loaded = false; 298 perf_counts__set_loaded(counter->counts, cpu, thread, false);
299 299
300 if (STAT_RECORD) { 300 if (STAT_RECORD) {
301 if (perf_evsel__write_stat_event(counter, cpu, thread, count)) { 301 if (perf_evsel__write_stat_event(counter, cpu, thread, count)) {