summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLeon Hwang <leon.hwang@linux.dev>2025-11-05 18:14:07 +0300
committerAlexei Starovoitov <ast@kernel.org>2025-11-13 20:15:33 +0300
commitc1cbf0d21c4194513248568e7ab935cf9bb92ff9 (patch)
tree7f61f3e2cf0711d081239efd040d927c8439171c /tools/perf/scripts/python
parent6af6e49a76c9af7d42eb923703e7648cb2bf401a (diff)
downloadlinux-c1cbf0d21c4194513248568e7ab935cf9bb92ff9.tar.xz
selftests/bpf: Add test to verify freeing the special fields in pcpu maps
Add test to verify that updating [lru_,]percpu_hash maps decrements refcount when BPF_KPTR_REF objects are involved. The tests perform the following steps: . Call update_elem() to insert an initial value. . Use bpf_refcount_acquire() to increment the refcount. . Store the node pointer in the map value. . Add the node to a linked list. . Probe-read the refcount and verify it is *2*. . Call update_elem() again to trigger refcount decrement. . Probe-read the refcount and verify it is *1*. Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20251105151407.12723-3-leon.hwang@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions