public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Andi Kleen <ak@linux.intel.com>, Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, namhyung@kernel.org, irogers@google.com,
	adrian.hunter@intel.com, eranian@google.com
Subject: Re: [PATCH 2/6] perf: Support branch events logging
Date: Mon, 17 Apr 2023 10:07:07 -0400	[thread overview]
Message-ID: <e83bfdc8-96d1-48df-0d5e-ea83359999e2@linux.intel.com> (raw)
In-Reply-To: <b008c6c8-5c6a-7a65-d123-058d7e8456b0@linux.intel.com>



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

  reply	other threads:[~2023-04-17 14:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 20:43 [PATCH 1/6] perf/x86/intel: Add Grand Ridge and Sierra Forest kan.liang
2023-04-10 20:43 ` [PATCH 2/6] perf: Support branch events logging kan.liang
2023-04-14 10:38   ` Peter Zijlstra
2023-04-14 13:35     ` Liang, Kan
2023-04-14 14:53       ` Peter Zijlstra
2023-04-14 15:56         ` Liang, Kan
2023-04-14 16:09           ` Peter Zijlstra
2023-04-14 17:53             ` Liang, Kan
2023-04-14 19:24               ` Peter Zijlstra
2023-04-14 20:34                 ` Liang, Kan
2023-04-14 22:01                   ` Peter Zijlstra
2023-04-14 22:47                     ` Andi Kleen
2023-04-17 11:46                       ` Peter Zijlstra
2023-04-17 13:37                         ` Andi Kleen
2023-04-17 14:07                           ` Liang, Kan [this message]
2023-04-17 11:55                       ` Peter Zijlstra
2023-04-17 13:41                         ` Andi Kleen
2023-04-10 20:43 ` [PATCH 3/6] perf/x86/intel: Support LBR event logging kan.liang
2023-04-10 20:43 ` [PATCH 4/6] tools headers UAPI: Sync include/uapi/linux/perf_event.h header with the kernel kan.liang
2023-04-10 20:43 ` [PATCH 5/6] perf tools: Add branch event knob kan.liang
2023-04-10 20:43 ` [PATCH 6/6] perf tools: Support PERF_SAMPLE_BRANCH_EVENT_IDS kan.liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e83bfdc8-96d1-48df-0d5e-ea83359999e2@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox