diff options
author | Ian Rogers | 2020-02-13 23:51:31 -0800 |
---|---|---|
committer | Ingo Molnar | 2020-03-06 11:57:00 +0100 |
commit | 836196beb377e59e54ec9e04f7402076ef7a8bd8 (patch) | |
tree | 98a7d78ff518a0802a2edc00b2ff2d3e59467948 /include | |
parent | 6eef8a7116deae0706ba6d897c0d7dd887cd2be2 (diff) |
perf/core: Add per perf_cpu_context min_heap storage
The storage required for visit_groups_merge's min heap needs to vary in
order to support more iterators, such as when multiple nested cgroups'
events are being visited. This change allows for 2 iterators and doesn't
support growth.
Based-on-work-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20200214075133.181299-5-irogers@google.com
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/perf_event.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 68e21e828893..8768a39b5258 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -862,6 +862,13 @@ struct perf_cpu_context { int sched_cb_usage; int online; + /* + * Per-CPU storage for iterators used in visit_groups_merge. The default + * storage is of size 2 to hold the CPU and any CPU event iterators. + */ + int heap_size; + struct perf_event **heap; + struct perf_event *heap_default[2]; }; struct perf_output_handle { |