Re: [PATCH v5 17/17] x86/perf, static_call: Optimize x86_pmu methods

From: Peter Zijlstra
Date: Thu Jul 09 2020 - 07:16:52 EST


On Wed, Jun 24, 2020 at 05:30:41PM +0200, Peter Zijlstra wrote:
> Replace many of the indirect calls with static_call().
>
> XXX run performance numbers

So I finally got around to doing that, and the average PMI time, as
measured by perf_sample_event_took()*:

PRE: 3283.03 [ns]
POST: 3145.12 [ns]

Which is a ~138 [ns] win per PMI, or ~4.2% decrease.

[*] on my IVB-EP, using: 'perf record -a -e cycles -- make O=defconfig-build/ -j80'