diff options
Diffstat (limited to 'tools/perf/util/counts.h')
-rw-r--r-- | tools/perf/util/counts.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/perf/util/counts.h b/tools/perf/util/counts.h index 0d1050ccc586..460b56ce3252 100644 --- a/tools/perf/util/counts.h +++ b/tools/perf/util/counts.h @@ -13,13 +13,13 @@ struct perf_counts_values { }; u64 values[3]; }; - bool loaded; }; struct perf_counts { s8 scaled; struct perf_counts_values aggr; struct xyarray *values; + struct xyarray *loaded; }; @@ -29,6 +29,18 @@ perf_counts(struct perf_counts *counts, int cpu, int thread) return xyarray__entry(counts->values, cpu, thread); } +static inline bool +perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread) +{ + return *((bool *) xyarray__entry(counts->loaded, cpu, thread)); +} + +static inline void +perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded) +{ + *((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded; +} + struct perf_counts *perf_counts__new(int ncpus, int nthreads); void perf_counts__delete(struct perf_counts *counts); |