From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Ian Rogers <irogers@google.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Jiri Olsa <jolsa@kernel.org>, Kajol Jain <kjain@linux.ibm.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
"David.Laight@aculab.com" <David.Laight@ACULAB.COM>,
James Clark <james.clark@arm.com>,
tianruidong@linux.alibaba.com, Leo Yan <leo.yan@linaro.org>,
Namhyung Kim <namhyung@kernel.org>,
yangtiezhu@loongson.cn, Disha Goel <disgoel@linux.vnet.ibm.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
mike.leach@linaro.org
Subject: Re: [PATCH 1/3] perf tests test_arm_coresight: Fix the shellcheck warning in latest test_arm_coresight.sh
Date: Thu, 12 Oct 2023 21:50:27 +0530 [thread overview]
Message-ID: <C4F6149F-C5FD-44AC-818F-0A84C08F45E2@linux.vnet.ibm.com> (raw)
In-Reply-To: <2219fc04-4484-b365-1281-a5307b368ec5@arm.com>
> On 12-Oct-2023, at 9:37 PM, Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>
> Hi,
>
> On 12/10/2023 16:56, Athira Rajeev wrote:
>>> On 05-Oct-2023, at 3:06 PM, Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>>
>>> On 05/10/2023 06:02, Namhyung Kim wrote:
>>>> On Thu, Sep 28, 2023 at 9:11 PM Athira Rajeev
>>>> <atrajeev@linux.vnet.ibm.com> wrote:
>>>>>
>
> ...
>
>>> Thanks for the fix.
>>>
>>> Nothing to do with this patch, but I am wondering if the original patch
>>> is over engineered and may not be future proof.
>>>
>>> e.g.,
>>>
>>> cs_etm_dev_name() {
>>> + cs_etm_path=$(find /sys/bus/event_source/devices/cs_etm/ -name cpu* -print -quit)
>>>
>>> Right there you got the device name and we can easily deduce the name of
>>> the "ETM" node.
>>>
>>> e.g,:
>>> etm=$(basename $(readlink cs_etm_path) | sed "s/[0-9]\+$//")
>>>
>>> And practically, nobody prevents an ETE mixed with an ETM on a "hybrid"
>>> system (hopefully, no one builds it ;-))
>>>
>>> Also, instead of hardcoding "ete" and "etm" prefixes from the arch part,
>>> we should simply use the cpu nodes from :
>>>
>>> /sys/bus/event_source/devices/cs_etm/
>>>
>>> e.g.,
>>>
>>> arm_cs_etm_traverse_path_test() {
>>> # Iterate for every ETM device
>>> for c in /sys/bus/event_source/devices/cs_etm/cpu*; do
>>> # Read the link to be on the safer side
>>> dev=`readlink $c`
>>>
>>> # Find the ETM device belonging to which CPU
>>> cpu=`cat $dev/cpu`
>>>
>>> # Use depth-first search (DFS) to iterate outputs
>>> arm_cs_iterate_devices $dev $cpu
>>> done;
>>> }
>>>
>>>
>>>
>>>> You'd better add Coresight folks on this.
>>>> Maybe this file was missing in the MAINTAINERS file.
>>>
>>> And the original author of the commit, that introduced the issue too.
>>>
>>> Suzuki
>> Hi All,
>> Thanks for the discussion and feedbacks.
>> This patch fixes the shellcheck warning introduced in function "cs_etm_dev_name". But with the changes that Suzuki suggested, we won't need the function "cs_etm_dev_name" since the code will use "/sys/bus/event_source/devices/cs_etm/" . In that case, can I drop this patch for now from this series ?
>
> Yes, please. James will send out the proposed patch
Hi Suzuki,
Sure. Thanks!
Athira
>
> Suzuki
>
>
next prev parent reply other threads:[~2023-10-12 16:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 4:11 [PATCH 0/3] Fix for shellcheck issues with latest scripts in tests/shell Athira Rajeev
2023-09-29 4:11 ` [PATCH 1/3] perf tests test_arm_coresight: Fix the shellcheck warning in latest test_arm_coresight.sh Athira Rajeev
2023-10-05 5:02 ` Namhyung Kim
2023-10-05 8:19 ` James Clark
2023-10-05 9:36 ` Suzuki K Poulose
2023-10-12 15:56 ` Athira Rajeev
2023-10-12 16:07 ` Suzuki K Poulose
2023-10-12 16:20 ` Athira Rajeev [this message]
2023-10-05 8:20 ` James Clark
2023-10-05 8:54 ` Athira Rajeev
2023-11-06 21:44 ` Arnaldo Carvalho de Melo
2023-11-07 6:38 ` Athira Rajeev
2023-11-08 20:04 ` Arnaldo Carvalho de Melo
2023-10-05 10:15 ` David Laight
2023-10-05 15:45 ` David Laight
2023-10-12 15:47 ` Athira Rajeev
2023-09-29 4:11 ` [PATCH 2/3] tools/perf/tests Ignore the shellcheck SC2046 warning in lock_contentio Athira Rajeev
2023-09-29 4:11 ` [PATCH 3/3] tools/perf/tests: Fix shellcheck warning in record_sideband.sh test Athira Rajeev
2023-10-05 5:04 ` Namhyung Kim
2023-10-05 8:55 ` Athira Rajeev
2023-10-03 7:47 ` [PATCH 0/3] Fix for shellcheck issues with latest scripts in tests/shell kajoljain
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=C4F6149F-C5FD-44AC-818F-0A84C08F45E2@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=David.Laight@ACULAB.COM \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=leo.yan@linaro.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mike.leach@linaro.org \
--cc=namhyung@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tianruidong@linux.alibaba.com \
--cc=yangtiezhu@loongson.cn \
/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).