linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: Ian Rogers <irogers@google.com>
Cc: "linux-perf-use." <linux-perf-users@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>
Subject: Re: perf test failures in linux-next on s390
Date: Thu, 15 Jun 2023 11:39:16 +0200	[thread overview]
Message-ID: <a19a30b0-8f16-5871-6856-503eadf56e3c@linux.ibm.com> (raw)
In-Reply-To: <CAP-5=fWjqJH0h607cVb1T7pRxDeq4cZBz5TECMajpnkvVNWHEQ@mail.gmail.com>

On 6/14/23 16:57, Ian Rogers wrote:
> On Wed, Jun 14, 2023 at 1:32 AM Thomas Richter <tmricht@linux.ibm.com> wrote:

....

> 
> Smaller list is okay. Could you send me a zip of the sysfs
> (/sys/devices) ? At least one issue is that the code didn't find a
> core PMU. On non-hybrid x86 this would be /sys/devices/cpu, I think we
> spoke about this before for s390 and there are >1. The issue here is
> that the test found 0, and we're trying to use PMUs in the code now as
> a way to sort events. There's code/comment in util/pmu.c:
> 
> '''
> /**
>  * is_sysfs_pmu_core() - PMU CORE devices have different name other than cpu in
>  *         sysfs on some platforms like ARM or Intel hybrid. Looking for
>  *         possible the cpus file in sysfs files to identify whether this is a
>  *         core device.
>  * @name: The PMU name such as "cpu_atom".
>  */
> static int is_sysfs_pmu_core(const char *name)
> {
> char path[PATH_MAX];
> 
> if (!perf_pmu__pathname_scnprintf(path, sizeof(path), name, "cpus"))
> return 0;
> return file_available(path);
> }
> ...
> bool is_pmu_core(const char *name)
> {
> return !strcmp(name, "cpu") || is_sysfs_pmu_core(name);
> }
> '''
> 
> Thanks,
> Ian
> 

Maybe we should scan the directory

[linux-next]# ll /sys/bus/event_source/devices
total 0
lrwxrwxrwx 1 root root 0 Jun  2 15:11 cpum_cf -> ../../../devices/cpum_cf
lrwxrwxrwx 1 root root 0 Jun  2 15:11 cpum_cf_diag -> ../../../devices/cpum_cf_diag
lrwxrwxrwx 1 root root 0 Jun  2 15:11 cpum_sf -> ../../../devices/cpum_sf
lrwxrwxrwx 1 root root 0 Jun  2 15:11 kprobe -> ../../../devices/kprobe
lrwxrwxrwx 1 root root 0 Jun  2 15:11 software -> ../../../devices/software
lrwxrwxrwx 1 root root 0 Jun  2 15:11 tracepoint -> ../../../devices/tracepoint
lrwxrwxrwx 1 root root 0 Jun  2 15:11 uprobe -> ../../../devices/uprobe
[linux-next]#

This directory lists the PMUs available on s390, maybe this is true for
other platform...

Just me 2 cents
>> --
>> Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
>> --
>> Vorsitzender des Aufsichtsrats: Gregor Pillen
>> Geschäftsführung: David Faller
>> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294
>>

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


  parent reply	other threads:[~2023-06-15  9:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 12:54 perf test failures in linux-next on s390 Thomas Richter
2023-06-13 14:32 ` Ian Rogers
2023-06-14  8:31   ` Thomas Richter
2023-06-14 14:57     ` Ian Rogers
2023-06-15  8:57       ` Thomas Richter
2023-06-15  9:39       ` Thomas Richter [this message]
2023-06-15 14:34         ` Arnaldo Carvalho de Melo
2023-06-16 14:23           ` Ian Rogers
2023-06-16 14:36             ` Hybrid PMU issues on aarch64. was: " Arnaldo Carvalho de Melo
2023-06-16 14:44               ` Arnaldo Carvalho de Melo
2023-06-16 16:28                 ` Ian Rogers
2023-06-16 16:53                   ` Arnaldo Carvalho de Melo
2023-06-16 21:47                     ` Arnaldo Carvalho de Melo
2023-06-16 22:09                       ` Ian Rogers
2023-06-19 10:04               ` Thomas Richter

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=a19a30b0-8f16-5871-6856-503eadf56e3c@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).