aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-perl.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2023-04-19 13:48:37 +0000
committerArnaldo Carvalho de Melo <[email protected]>2023-04-19 13:53:01 +0000
commit8f12692b7e61e5fb5d3e4f6692d6675f62eeebdc (patch)
treec3c653ed2524b984c7b4ae279d6a096f344fd569 /tools/perf/util/scripting-engines/trace-event-perl.c
parentperf maps: Use maps__nr_maps() instead of open coded maps->nr_maps (diff)
downloadkernel-8f12692b7e61e5fb5d3e4f6692d6675f62eeebdc.tar.gz
kernel-8f12692b7e61e5fb5d3e4f6692d6675f62eeebdc.zip
perf maps: Add reference count checking
Add reference count checking to make sure of good use of get and put. Add and use accessors to reduce RC_CHK clutter. The only significant issue was in tests/thread-maps-share.c where reference counts were released in the reverse order to acquisition, leading to a use after put. This was fixed by reversing the put order. Committer notes: Extracted from a larger patch removing bits that were covered by the use of pre-existing maps__ accessors (e.g. maps__nr_maps()) and new ones added (maps__refcnt()) to reduce RC_CHK_ACCESS(maps)-> source code pollution. Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexey Bayduraev <[email protected]> Cc: Dmitriy Vyukov <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Riccardo Mancini <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Stephen Brennan <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions