qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] target/ppc: Increment PMC5 with inline insns


From: Leandro Lupori
Subject: Re: [PATCH 3/3] target/ppc: Increment PMC5 with inline insns
Date: Tue, 25 Oct 2022 17:39:34 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 10/25/22 16:29, Daniel Henrique Barboza wrote:

On 10/21/22 14:01, Leandro Lupori wrote:
Profiling QEMU during Fedora 35 for PPC64 boot revealed that
6.39% of total time was being spent in helper_insns_inc(), on a
POWER9 machine. To avoid calling this helper every time PMCs had
to be incremented, an inline implementation of PMC5 increment and
check for overflow was developed. This led to a reduction of
about 12% in Fedora's boot time.

Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br>
---

Given that PMC5 is the counter that is most likely to be active, yeah,
isolating the case where PMC5 is incremented standalone makes sense.

Still, 12% performance gain is not too shaby. Not too shaby at all.


I've tried to move more of helper_insns_inc() to the inline implementation, but then performance started to decrease.

Initially I found this strange, but perf revealed a considerable increase of time spent in functions such as tcg_gen_code and liveness_pass_1.

So as this code has to be generated and optimized for most TBs, it seems it makes code generation slower if it's too big.


Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]