public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: namhyung@kernel.org, irogers@google.com, jolsa@kernel.org,
	adrian.hunter@intel.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf env: Find correct branch counter info on hybrid
Date: Wed, 11 Sep 2024 13:01:05 -0300	[thread overview]
Message-ID: <ZuG-wWTiQm6ZzXbN@x1> (raw)
In-Reply-To: <ZuG-FYTFnE6U3PTn@x1>

On Wed, Sep 11, 2024 at 12:58:16PM -0300, Arnaldo Carvalho de Melo wrote:
> On Wed, Sep 11, 2024 at 11:41:54AM -0400, Liang, Kan wrote:
> > On 2024-09-11 10:19 a.m., Arnaldo Carvalho de Melo wrote:
> > > On Mon, Sep 09, 2024 at 11:42:00AM -0700, kan.liang@linux.intel.com wrote:
> > >> From: Kan Liang <kan.liang@linux.intel.com>
> > >>
> > >> No event is printed in the "Branch Counter" column on hybrid machines.
> > >>
> > >> For example,
> > >>  $perf record -e "{cpu_core/branch-instructions/pp,cpu_core/branches/}:S"
> > >>  -j any,counter
> > >>  $perf report --total-cycles
> > > 
> > > So I tried this on an Intel Hybrid system, I start the TUI, then try 'B'
> > > and, after applying your patch:
> > > 
> > >   0.66%  67.8K  0.00%   75                    ┌─Branch counter abbr list────────────┐ibc_write+18]          libc.so.6
> > >   0.63%  65.4K  0.00%  106                  [p│                                     │r_active+159]          [kernel.kallsyms]
> > >   0.61%  63.2K  0.01%  175  [native_queued_spi│ The branch counter is not available.│in_lock_slowpath+528]  [kernel.kallsyms]
> > >   0.57%  58.4K  0.00%   39         [syscall_ex│Press any key...                     │ser_mode+109]          [kernel.kallsyms]
> > >   0.54%  55.6K  0.00%    1  [_IO_file_xsputn@@└─────────────────────────────────────┘BC_2.2.5+316]          libc.so.6
> > > 
> > > The perf.data was obtained from:
> > > 
> > > root@number:~# perf record -e "{cpu_core/branch-instructions/pp,cpu_core/branches/}:S" -j any,counter find /
> > > 
> > > And:
> > > 
> > > root@number:~# perf evlist --group 
> > > {cpu_core/branch-instructions/pp,cpu_core/branches/}
> > > dummy:u
> > > root@number:~# 
> > > 
> > > Only mishap above we discussed already, the missing :S, and then:
> > > 
> > > root@number:~# perf evlist -v
> > > cpu_core/branch-instructions/pp: type: 4 (cpu_core), size: 136, config: 0xc4 (branch-instructions), { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|READ|PERIOD|BRANCH_STACK|IDENTIFIER, read_format: ID|GROUP|LOST, disabled: 1, freq: 1, enable_on_exec: 1, precise_ip: 2, sample_id_all: 1, exclude_guest: 1, branch_sample_type: ANY
> > 
> > For a hybrid client, the "Branch Counter" feature is only supported
> > starting from the just released Lunar Lake. Perf falls back to only
> > "ANY" on your Raptor Lake.
> > 
> > The "The branch counter is not available" message is expected.
> > 
> > Here is the perf evlist result from my Lunar Lake machine,
> > 
> > #perf evlist -v
> > cpu_core/branch-instructions/pp: type: 4 (cpu_core), size: 136, config:
> > 0xc4 (branch-instructions), { sample_period, sample_freq }: 4000,
> > sample_type: IP|TID|TIME|READ|PERIOD|BRANCH_STACK|IDENTIFIER,
> > read_format: ID|GROUP|LOST, disabled: 1, freq: 1, enable_on_exec: 1,
> > precise_ip: 2, sample_id_all: 1, exclude_guest: 1, branch_sample_type:
> > ANY|COUNTERS
> 
> So I'll just take the patch and add these explanations there, ok?

Added this:

Committer notes:

While testing I couldn't s ee those "Branch counter" columns enabled by
pressing 'B' on the TUI, after reporting it to the list Kan explained
the situation:

<quote Kan Liang>
For a hybrid client, the "Branch Counter" feature is only supported
starting from the just released Lunar Lake. Perf falls back to only
"ANY" on your Raptor Lake.

The "The branch counter is not available" message is expected.

Here is the 'perf evlist' result from my Lunar Lake machine,

  # perf evlist -v
  cpu_core/branch-instructions/pp: type: 4 (cpu_core), size: 136, config: 0xc4 (branch-instructions), { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|READ|PERIOD|BRANCH_STACK|IDENTIFIER, read_format: ID|GROUP|LOST, disabled: 1, freq: 1, enable_on_exec: 1, precise_ip: 2, sample_id_all: 1, exclude_guest: 1, branch_sample_type: ANY|COUNTERS
  #
</quote>

      parent reply	other threads:[~2024-09-11 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 18:42 [PATCH] perf env: Find correct branch counter info on hybrid kan.liang
2024-09-09 20:42 ` Ian Rogers
2024-09-11 14:19 ` Arnaldo Carvalho de Melo
2024-09-11 15:41   ` Liang, Kan
2024-09-11 15:58     ` Arnaldo Carvalho de Melo
2024-09-11 16:00       ` Liang, Kan
2024-09-11 16:01       ` Arnaldo Carvalho de Melo [this message]

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=ZuG-wWTiQm6ZzXbN@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.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