aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/llvm-c-helpers.cpp
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2024-08-29 23:51:50 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-08-30 10:03:39 -0300
commit36cddd105666d45a2cfb70a04c27b0c53bb383cd (patch)
tree8e7739700a9fccf5506a33e6fd76bdb3bcfb4095 /tools/perf/util/llvm-c-helpers.cpp
parent05a5dd1dfd8fdeee6498875c2d78d4385d627bd6 (diff)
perf lock contention: Do not fail EEXIST for update
When it updates the lock stat for the first time, it needs to create an element in the BPF hash map. But if there's a concurrent thread waiting for the same lock (like for rwsem or rwlock), it might race with the thread and possibly fail to update with -EEXIST. In that case, it can lookup the map again and put the data there instead of failing. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <song@kernel.org> Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20240830065150.1758962-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/llvm-c-helpers.cpp')
0 files changed, 0 insertions, 0 deletions