linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
	acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
	irogers@google.com, namhyung@kernel.org
Cc: linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	maddy@linux.ibm.com, kjain@linux.ibm.com,
	disgoel@linux.vnet.ibm.com, hbathini@linux.vnet.ibm.com,
	Aditya.Bodkhe1@ibm.com
Subject: Re: [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid
Date: Fri, 14 Feb 2025 13:43:22 +0100	[thread overview]
Message-ID: <325f8f95-3fa8-47f5-a763-c8b41de700bd@linux.ibm.com> (raw)
In-Reply-To: <20250212185438.15251-1-atrajeev@linux.vnet.ibm.com>

On 2/12/25 19:54, Athira Rajeev wrote:
> "Tool PMU" tests fails on powerpc as below:
> 
>    12.1: Parsing without PMU name:
>    --- start ---
>    test child forked, pid 48492
>    Using CPUID 0x00800200
>    Attempt to add: tool/duration_time/
>    ..after resolving event: tool/config=0x1/
>    duration_time -> tool/duration_time/
>    Attempt to add: tool/user_time/
>    ..after resolving event: tool/config=0x2/
>    user_time -> tool/user_time/
>    Attempt to add: tool/system_time/
>    ..after resolving event: tool/config=0x3/
>    system_time -> tool/system_time/
>    Attempt to add: tool/has_pmem/
>    ..after resolving event: tool/config=0x4/
>    has_pmem -> tool/has_pmem/
>    Attempt to add: tool/num_cores/
>    ..after resolving event: tool/config=0x5/
>    num_cores -> tool/num_cores/
>    Attempt to add: tool/num_cpus/
>    ..after resolving event: tool/config=0x6/
>    num_cpus -> tool/num_cpus/
>    Attempt to add: tool/num_cpus_online/
>    ..after resolving event: tool/config=0x7/
>    num_cpus_online -> tool/num_cpus_online/
>    Attempt to add: tool/num_dies/
>    ..after resolving event: tool/config=0x8/
>    num_dies -> tool/num_dies/
>    Attempt to add: tool/num_packages/
>    ..after resolving event: tool/config=0x9/
>    num_packages -> tool/num_packages/
> 
>    ---- unexpected signal (11) ----
>    12.1: Parsing without PMU name                                      : FAILED!
> 
> Same fail is observed for "Parsing with PMU name" as well.
> 
> The testcase loops through events in tool_pmu__for_each_event()
> and access event name using "tool_pmu__event_to_str()".
> Here tool_pmu__event_to_str returns null for "slots" event
> and "system_tsc_freq" event. These two events are only applicable
> for arm64 and x86 respectively. So the function tool_pmu__event_to_str()
> skips for unsupported events and returns null. This null value is
> causing testcase fail.
> 
> To address this in "Tool PMU" testcase, add a helper function
> tool_pmu__all_event_to_str() which returns the name for all
> events mapping to the tool_pmu_event index including the
> skipped ones. So that even if its a skipped event, the
> helper function helps to resolve the tool_pmu_event index to
> its mapping event name. Update the testcase to check for null event
> names before proceeding the test.
> 
> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>

for s390:
Tested-by: Thomas Richter <tmricht@linux.ibm.com>

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294


      parent reply	other threads:[~2025-02-14 12:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 18:54 [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid Athira Rajeev
2025-02-13  3:34 ` Namhyung Kim
2025-02-17 12:17   ` Athira Rajeev
2025-02-17 12:25   ` Athira Rajeev
2025-02-14 12:43 ` Thomas Richter [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=325f8f95-3fa8-47f5-a763-c8b41de700bd@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=Aditya.Bodkhe1@ibm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=disgoel@linux.vnet.ibm.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kjain@linux.ibm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --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;
as well as URLs for NNTP newsgroup(s).