All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jin Yao <yao.jin@linux.intel.com>, John Garry <john.garry@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Jin Yao <yao.jin@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Zhangshaokun <zhangshaokun@hisilicon.com>,
	"liuqi (BA)" <liuqi115@huawei.com>
Subject: Re: [bug report] Patch "perf tools: Fix pattern matching for same substring in different pmu type" broken
Date: Mon, 19 Jul 2021 17:01:28 -0300	[thread overview]
Message-ID: <YPXaGPfofvrUGBLa@kernel.org> (raw)
In-Reply-To: <44e25825-5f23-c641-9f1c-72268d895f75@huawei.com>

Em Mon, Jul 19, 2021 at 03:13:06PM +0100, John Garry escreveu:
> Hi guys,
> 
> The named patch has broken PMU alias matching on my arm64 system.

Hi Jin, can you please address this report? Otherwise I'll have to
revert the patch in my next pull req to Linus :-\

- Arnaldo
 
> Specifically it is broken for when multiple tokens are used in the alias.
> For example, alias "hisi_sccl,l3c" would previously match for PMU
> "hisi_sccl3_l3c7", but that no longer works.
> 
> In my example, in looking at the code, the callchain
> pmu_uncore_alias_match("hisi_sccl,l3c", "hisi_sccl3_l3c7") ->
> per_pmu__valid_suffix("hisi_sccl3_l3c7", "hisi_sccl") fails in the following
> check:
> 
> static bool perf_pmu__valid_suffix(char *pmu_name, char *tok)
> {
> 	char *p;
> 	...
> 	p = pmu_name + strlen(tok);
> 	...
> 	if (*p != '_') //here
> 		return false;
> }
> 
> This check assumes the first token must be followed by a '_', but it is
> possibly a numeric.
> 
> Please let me know how this should work. Previously it would match on the
> tokens, ignoring numerics and '_'.
> 
> As an aside, I'll look at why our testcases don't cover this scenario and
> look to add a test if necessary.
> 
> Thanks,
> john
> 
> Ps, please cc linux-perf-users@vger.kernel.org as in the MAINTAINERS file in
> future, as not all subscribe to the open kernel list (and so cannot easily
> reply directly).
> 

-- 

- Arnaldo

  reply	other threads:[~2021-07-19 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 14:13 [bug report] Patch "perf tools: Fix pattern matching for same substring in different pmu type" broken John Garry
2021-07-19 20:01 ` Arnaldo Carvalho de Melo [this message]
2021-07-20  5:56 ` Jin, Yao

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=YPXaGPfofvrUGBLa@kernel.org \
    --to=acme@kernel.org \
    --cc=john.garry@huawei.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=liuqi115@huawei.com \
    --cc=yao.jin@linux.intel.com \
    --cc=zhangshaokun@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.