diff options
author | Omar Sandoval <osandov@fb.com> | 2024-11-08 17:28:39 -0800 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-12-02 11:21:03 +0100 |
commit | c9136fad4c08288be26aaff3e63d634545b32a85 (patch) | |
tree | 5796d3093f1e61a64d1a1c2ee333f809a9ba742c /tools/perf/scripts/python/stackcollapse.py | |
parent | 40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff) |
proc/kcore: mark proc entry as permanent
drgn reads from /proc/kcore to debug the running kernel. For many drgn
scripts, /proc/kcore is actually a bottleneck.
use_pde() and unuse_pde() in prog_reg_read() show up hot in profiles.
Since the entry for /proc/kcore can never be removed, this is useless
overhead that can be trivially avoided by marking the entry as
permanent.
In my benchmark, this reduces the time per read by about 20 nanoseconds,
from 235 nanoseconds per read to 215.
Link: https://github.com/osandov/drgn/issues/106
Signed-off-by: Omar Sandoval <osandov@fb.com>
Link: https://lore.kernel.org/r/60873e6afcfda3f08d0456f19e4733612afcf134.1731115587.git.osandov@fb.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions