[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e83bfdc8-96d1-48df-0d5e-ea83359999e2@linux.intel.com>
Date: Mon, 17 Apr 2023 10:07:07 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Andi Kleen <ak@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, acme@...nel.org, linux-kernel@...r.kernel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, namhyung@...nel.org, irogers@...gle.com,
adrian.hunter@...el.com, eranian@...gle.com
Subject: Re: [PATCH 2/6] perf: Support branch events logging
On 2023-04-17 9:37 a.m., Andi Kleen wrote:
>
> On 4/17/2023 4:46 AM, Peter Zijlstra wrote:
>> On Fri, Apr 14, 2023 at 03:47:29PM -0700, Andi Kleen wrote:
>>>> Yeah, don't do this. There is no guarantee what so ever you'll get any
>>>> of those events in the 0-3 range.
>>>
>>> The kernel can simply force to 0-3 if LBR is enabled and the feature
>>> too.
>>> It's in Kan's patch
>>>
>>> and it isn't particularly complicated.
>> And what, totally leave 4-7 unused even if those counters were not
>> related to LBR at all? That seems exceedingly daft.
>
>
> Only for the events which enabled LBR and also only if the branch events
> feature is enabled
>
> -j event -e '{event1:b,event2:b,event3:b,event4:b,event5,event6}'
>
> event5 and 6 can go > 3
>
> Given there is currently no syntax to control branch events inside a
> group other than fully enabling/disabling LBR.
>
> Kan, I guess that could be added to the user tools.
We already have a per-event option for LBR, branch_type, which can be
used to control branch events in a group. With the patch in this series,
we can do, e.g.,
-j call -e
'{cpu/event=0x1,branch_type=event,/,cpu/event=0x2,branch_type=event/,cpu/event=0x3,branch_type=event/,cpu/event=0x4,branch_type=event/,cpu/event=0x5/,cpu/event=0x6/}'
Thanks,
Kan
Powered by blists - more mailing lists