summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-06-15 17:55:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-06-19 12:35:56 -0700
commit7d286849a8de41c1aee2957e224c5802d3488c8d (patch)
tree9ade2fac2e278553916a51434846507a73b6a878 /tools/perf/util/trace-event-scripting.c
parent6ba59ff4227927d3a8530fc2973b80e94b54d58f (diff)
downloadlinux-7d286849a8de41c1aee2957e224c5802d3488c8d.tar.gz
linux-7d286849a8de41c1aee2957e224c5802d3488c8d.tar.bz2
linux-7d286849a8de41c1aee2957e224c5802d3488c8d.zip
vfs: link_path_walk: simplify name hash flow
This is one of those hot functions in path walking, and it's doing things in just the wrong order that causes slightly unnecessary extra work. Move the name pointer update and the setting of 'nd->last' up a bit, so that the (unlikely) filesystem-specific hashing can run on them in place, instead of having to set up a copy on the stack and copy things back and forth. Because even when the hashing is not run, it causes the stack frame of the function to be bigger to hold the unnecessary temporary copy. This also means that we never then reference the full "hashlen" field after calculating it, and can clarify the code with just using the length part. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions