perf/hw_breakpoint: Introduce bp_slots_histogram
authorMarco Elver <elver@google.com>
Mon, 29 Aug 2022 12:47:17 +0000 (14:47 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 30 Aug 2022 08:56:24 +0000 (10:56 +0200)
commit16db2839a5a59c242df77308cf57342ce0c3768e
treea48378cfa04fdf7ae5ed6a9d2e101d2f346f3440
parent0912037fec1136d4e4796a3481f4a4ee09a2c325
perf/hw_breakpoint: Introduce bp_slots_histogram

Factor out the existing `atomic_t count[N]` into its own struct called
'bp_slots_histogram', to generalize and make its intent clearer in
preparation of reusing elsewhere. The basic idea of bucketing "total
uses of N slots" resembles a histogram, so calling it such seems most
intuitive.

No functional change.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20220829124719.675715-13-elver@google.com
kernel/events/hw_breakpoint.c