From: Suzuki K Poulose <Suzuki.Poulose@arm.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
acme@kernel.org, jolsa@kernel.org
Cc: peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V2 5/6] coresight: adding sink parameter to function coresight_build_path()
Date: Thu, 21 Jul 2016 11:49:23 +0100 [thread overview]
Message-ID: <07484e7c-7d19-465f-04d9-1dbb4899b643@arm.com> (raw)
In-Reply-To: <1469047100-18131-6-git-send-email-mathieu.poirier@linaro.org>
On 20/07/16 21:38, Mathieu Poirier wrote:
> Up to now function coresight_build_path() was counting on a sink to
> have been selected (from sysFS) prior to being called. This patch
> adds a string argument so that a sink matching the argument can be
> selected.
>
> static int _coresight_build_path(struct coresight_device *csdev,
> - struct list_head *path)
> + struct list_head *path, const char *sink)
> {
> int i;
> bool found = false;
> struct coresight_node *node;
>
> - /* An activated sink has been found. Enqueue the element */
> - if ((csdev->type == CORESIGHT_DEV_TYPE_SINK ||
> - csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) && csdev->activated)
> - goto out;
> + /*
> + * First see if we are dealing with a sink. If we have one check if
> + * it was selected via sysFS or the perf cmd line.
> + */
> + if (csdev->type == CORESIGHT_DEV_TYPE_SINK ||
> + csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) {
> + /* Activated via perf cmd line */
> + if (sink && !strcmp(dev_name(&csdev->dev), sink))
> + goto out;
> + /* Activated via sysFS */
> + if (csdev->activated)
When a sink is specified, should we skip an activated sink and continue to
find the specified one ? or at least fail with an error as we may not be using
the sink specified by the user ?
i.e may be :
if (!sink && csdev->activated)
goto out;
Suzuki
next prev parent reply other threads:[~2016-07-21 10:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 20:38 [PATCH V2 0/6] perf: Driver specific configuration for PMU Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 1/6] perf/core: Adding PMU driver specific configuration Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 2/6] perf: Passing struct perf_event to function setup_aux() Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-21 14:44 ` Mathieu Poirier
2016-07-21 14:54 ` Jiri Olsa
2016-07-21 15:47 ` Mathieu Poirier
2016-07-22 18:24 ` Mathieu Poirier
2016-07-26 20:41 ` Jiri Olsa
2016-07-27 17:59 ` Mathieu Poirier
2016-07-27 19:26 ` Jiri Olsa
2016-07-28 16:15 ` Mathieu Poirier
2016-07-28 16:52 ` Jiri Olsa
2016-07-21 7:47 ` Jiri Olsa
2016-07-20 20:38 ` [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel Mathieu Poirier
2016-07-21 7:47 ` Jiri Olsa
2016-07-22 19:57 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 5/6] coresight: adding sink parameter to function coresight_build_path() Mathieu Poirier
2016-07-21 10:49 ` Suzuki K Poulose [this message]
2016-07-21 15:05 ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 6/6] coresight: etm-perf: incorporating sink definition from cmd line Mathieu Poirier
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=07484e7c-7d19-465f-04d9-1dbb4899b643@arm.com \
--to=suzuki.poulose@arm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®