diff options
author | Namhyung Kim <[email protected]> | 2024-04-29 15:57:38 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-05-02 16:35:47 -0300 |
commit | 3cdd98b42d212160d7aae746a97960a4595cbfc2 (patch) | |
tree | f1dab900e645c094567b21e735656f45abe17bf9 /tools/perf/scripts/python/gecko.py | |
parent | e3123079b906dc2edb80466de85b2c333a56fbf2 (diff) |
perf maps: Remove check_invariants() from maps__lock()
I found that the debug build was a slowed down a lot by the maps lock
code since it checks the invariants whenever it gets the pointer to the
lock. This means it checks twice the invariants before and after the
access.
Instead, let's move the checking code within the lock area but after any
modification and remove it from the read paths. This would remove (more
than) half of the maps lock overhead.
The time for perf report with a huge data file (200k+ of MMAP2 events).
Non-debug Before After
--------- -------- --------
2m 43s 6m 45s 4m 21s
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions