aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/perf/include/internal/cpumap.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/perf/include/internal/cpumap.h')
-rw-r--r--tools/lib/perf/include/internal/cpumap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/lib/perf/include/internal/cpumap.h b/tools/lib/perf/include/internal/cpumap.h
index 840d4032587b..4054169c12c5 100644
--- a/tools/lib/perf/include/internal/cpumap.h
+++ b/tools/lib/perf/include/internal/cpumap.h
@@ -4,9 +4,18 @@
#include <linux/refcount.h>
+/**
+ * A sized, reference counted, sorted array of integers representing CPU
+ * numbers. This is commonly used to capture which CPUs a PMU is associated
+ * with. The indices into the cpumap are frequently used as they avoid having
+ * gaps if CPU numbers were used. For events associated with a pid, rather than
+ * a CPU, a single dummy map with an entry of -1 is used.
+ */
struct perf_cpu_map {
refcount_t refcnt;
+ /** Length of the map array. */
int nr;
+ /** The CPU values. */
int map[];
};