diff options
author | Ian Rogers <irogers@google.com> | 2024-05-08 06:52:59 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-05-10 00:13:22 +0300 |
commit | de6a908384fb1a8327ba46a2baec67d1dfe9a3e1 (patch) | |
tree | 608eba1de49211bcddadc00918d3094110a0740b /tools/perf/util/parse-sublevel-options.h | |
parent | 90f01afb0dfafbc9b094bb61e61a4ac297d9d0d2 (diff) | |
download | linux-de6a908384fb1a8327ba46a2baec67d1dfe9a3e1.tar.xz |
perf comm: Fix comm_str__put() for reference count checking
Searching for the entry in the array needs to avoid the intermediate
pointer with reference count checking.
Refactor the array removal to binary search for the entry.
Change the array to hold an entry with a reference count (so the
intermediate pointer can work) and remove from the array when the
reference count on a comm_str falls to 1.
Fixes: 13ca628716c6f2c3 ("perf comm: Add reference count checking to 'struct comm_str'")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240508035301.1554434-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-sublevel-options.h')
0 files changed, 0 insertions, 0 deletions