perf ftrace: Use atomic inc to update histogram in BPF
It should use an atomic instruction to update even if the histogram is keyed by delta as it's also used for stats. Cc: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/r/20250227191223.1288473-3-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -142,7 +142,7 @@ do_lookup:
|
||||
if (!hist)
|
||||
return 0;
|
||||
|
||||
*hist += 1;
|
||||
__sync_fetch_and_add(hist, 1);
|
||||
|
||||
__sync_fetch_and_add(&total, delta); // always in nsec
|
||||
__sync_fetch_and_add(&count, 1);
|
||||
|
||||
Reference in New Issue
Block a user