[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b82d59b2-71bf-2c91-869c-0068760c9ed3@linux.intel.com>
Date: Fri, 14 Sep 2018 08:39:36 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Alexey Budankov <alexey.budankov@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>
Cc: linux-kernel-owner@...r.kernel.org, peterz@...radead.org,
tglx@...utronix.de, acme@...nel.org, mingo@...hat.com,
linux-kernel@...r.kernel.org, jolsa@...hat.com, namhyung@...nel.org
Subject: Re: [PATCH] perf/x86/intel/lbr: Optimize context switches for LBR
On 9/14/2018 5:22 AM, Alexey Budankov wrote:
>
> Hi Andi,
>
> On 14.09.2018 11:54, Andi Kleen wrote:
>>>> In principle the LBRs need to be flushed between threads. So does
>>>> current code.
>>>
>>> IMHO, ideally, LBRs stack would be preserved and restored when
>>> switching between execution stacks. That would allow implementing
>>> per-thread statistical call graph view in Perf tools, fully based
>>> on HW capabilities. It could be advantageous for some cases, in
>>> comparison with traditional dwarf based call graph.
>>
>> This is already supported when you use LBR call stack mode
>> (perf record --call-graph lbr)
>
> Which kernel versions does it make sense to try?
>
The optimization for LBR call stack has been merged into 4.19.
commit id: 8b077e4a69bef5c4121426e99497975860191e53
perf/x86/intel/lbr: Optimize context switches for the LBR call stack
Thanks,
Kan
> Thanks,
> Alexey
>
>>
>> This change is only optimizing the case when call stack mode is not used.
>>
>> Of course in call stack mode the context switch overhead is even higher,
>> because it not only writes, but also reads.
>>
>> -Andi
>>
Powered by blists - more mailing lists