aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorGravatar Peter Zijlstra <peterz@infradead.org> 2019-10-17 20:31:03 +0200
committerGravatar Ingo Molnar <mingo@kernel.org> 2019-10-28 12:51:02 +0100
commit66d258c5b048840991de49697264af75f5b09def (patch)
treef42f5db64830e46d62bf422dcf6f3d4bc5065ff3 /arch/x86
parentperf/core: Optimize perf_install_in_event() (diff)
downloadlinux-66d258c5b048.tar.gz
linux-66d258c5b048.tar.bz2
linux-66d258c5b048.zip
perf/core: Optimize perf_init_event()
Andi reported that he was hitting the linear search in perf_init_event() a lot. Make more agressive use of the IDR lookup to avoid hitting the linear search. With exception of PERF_TYPE_SOFTWARE (which relies on a hideous hack), we can put everything in the IDR. On top of that, we can alias TYPE_HARDWARE and TYPE_HW_CACHE to TYPE_RAW on the lookup side. This greatly reduces the chances of hitting the linear search. Reported-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan <kan.liang@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions