From: mathieu.poirier@linaro.org (Mathieu Poirier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 08/10] coresight: perf: Add helper to retrieve sink configuration
Date: Thu, 19 Jul 2018 14:07:39 -0600 [thread overview]
Message-ID: <20180719200739.GB9421@xps15> (raw)
In-Reply-To: <1531847501-22226-9-git-send-email-suzuki.poulose@arm.com>
On Tue, Jul 17, 2018 at 06:11:39PM +0100, Suzuki K Poulose wrote:
> We can always find the sink configuration for a given perf_output_handle.
> Add a helper to retrieve the sink configuration for a given
> perf_output_handle. This will be used to get rid of the set_buffer()
> call back.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> drivers/hwtracing/coresight/coresight-etm-perf.c | 14 -------------
> drivers/hwtracing/coresight/coresight-etm-perf.h | 26 ++++++++++++++++++++++++
> 2 files changed, 26 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index 6a4252b..3cc4a0b 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -23,20 +23,6 @@
> static struct pmu etm_pmu;
> static bool etm_perf_up;
>
> -/**
> - * struct etm_event_data - Coresight specifics associated to an event
> - * @work: Handle to free allocated memory outside IRQ context.
> - * @mask: Hold the CPU(s) this event was set for.
> - * @snk_config: The sink configuration.
> - * @path: An array of path, each slot for one CPU.
> - */
> -struct etm_event_data {
> - struct work_struct work;
> - cpumask_t mask;
> - void *snk_config;
> - struct list_head * __percpu *path;
> -};
> -
If this is moved to coresight-etm-perf.h, the #include <linux/percpu-defs.h> can
be removed.
> static DEFINE_PER_CPU(struct perf_output_handle, ctx_handle);
> static DEFINE_PER_CPU(struct coresight_device *, csdev_src);
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.h b/drivers/hwtracing/coresight/coresight-etm-perf.h
> index 4197df4..da7d933 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.h
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.h
> @@ -7,6 +7,7 @@
> #ifndef _CORESIGHT_ETM_PERF_H
> #define _CORESIGHT_ETM_PERF_H
>
> +#include <linux/percpu-defs.h>
> #include "coresight-priv.h"
>
> struct coresight_device;
> @@ -42,14 +43,39 @@ struct etm_filters {
> bool ssstatus;
> };
>
> +/**
> + * struct etm_event_data - Coresight specifics associated to an event
> + * @work: Handle to free allocated memory outside IRQ context.
> + * @mask: Hold the CPU(s) this event was set for.
> + * @snk_config: The sink configuration.
> + * @path: An array of path, each slot for one CPU.
> + */
> +struct etm_event_data {
> + struct work_struct work;
> + cpumask_t mask;
> + void *snk_config;
> + struct list_head * __percpu *path;
> +};
>
> #ifdef CONFIG_CORESIGHT
> int etm_perf_symlink(struct coresight_device *csdev, bool link);
> +static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
> +{
> + struct etm_event_data *data = perf_get_aux(handle);
>
> + if (data)
> + return data->snk_config;
> + return NULL;
> +}
> #else
> static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
> { return -EINVAL; }
>
> +static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
> +{
> + return NULL;
> +}
> +
I think we can do without those... See my comment in the next patch.
Thanks,
Mathieu
> #endif /* CONFIG_CORESIGHT */
>
> #endif
> --
> 2.7.4
>
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, robert.walker@arm.com,
mike.leach@linaro.org, coresight@lists.linaro.org
Subject: Re: [PATCH v2 08/10] coresight: perf: Add helper to retrieve sink configuration
Date: Thu, 19 Jul 2018 14:07:39 -0600 [thread overview]
Message-ID: <20180719200739.GB9421@xps15> (raw)
In-Reply-To: <1531847501-22226-9-git-send-email-suzuki.poulose@arm.com>
On Tue, Jul 17, 2018 at 06:11:39PM +0100, Suzuki K Poulose wrote:
> We can always find the sink configuration for a given perf_output_handle.
> Add a helper to retrieve the sink configuration for a given
> perf_output_handle. This will be used to get rid of the set_buffer()
> call back.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> drivers/hwtracing/coresight/coresight-etm-perf.c | 14 -------------
> drivers/hwtracing/coresight/coresight-etm-perf.h | 26 ++++++++++++++++++++++++
> 2 files changed, 26 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index 6a4252b..3cc4a0b 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -23,20 +23,6 @@
> static struct pmu etm_pmu;
> static bool etm_perf_up;
>
> -/**
> - * struct etm_event_data - Coresight specifics associated to an event
> - * @work: Handle to free allocated memory outside IRQ context.
> - * @mask: Hold the CPU(s) this event was set for.
> - * @snk_config: The sink configuration.
> - * @path: An array of path, each slot for one CPU.
> - */
> -struct etm_event_data {
> - struct work_struct work;
> - cpumask_t mask;
> - void *snk_config;
> - struct list_head * __percpu *path;
> -};
> -
If this is moved to coresight-etm-perf.h, the #include <linux/percpu-defs.h> can
be removed.
> static DEFINE_PER_CPU(struct perf_output_handle, ctx_handle);
> static DEFINE_PER_CPU(struct coresight_device *, csdev_src);
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.h b/drivers/hwtracing/coresight/coresight-etm-perf.h
> index 4197df4..da7d933 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.h
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.h
> @@ -7,6 +7,7 @@
> #ifndef _CORESIGHT_ETM_PERF_H
> #define _CORESIGHT_ETM_PERF_H
>
> +#include <linux/percpu-defs.h>
> #include "coresight-priv.h"
>
> struct coresight_device;
> @@ -42,14 +43,39 @@ struct etm_filters {
> bool ssstatus;
> };
>
> +/**
> + * struct etm_event_data - Coresight specifics associated to an event
> + * @work: Handle to free allocated memory outside IRQ context.
> + * @mask: Hold the CPU(s) this event was set for.
> + * @snk_config: The sink configuration.
> + * @path: An array of path, each slot for one CPU.
> + */
> +struct etm_event_data {
> + struct work_struct work;
> + cpumask_t mask;
> + void *snk_config;
> + struct list_head * __percpu *path;
> +};
>
> #ifdef CONFIG_CORESIGHT
> int etm_perf_symlink(struct coresight_device *csdev, bool link);
> +static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
> +{
> + struct etm_event_data *data = perf_get_aux(handle);
>
> + if (data)
> + return data->snk_config;
> + return NULL;
> +}
> #else
> static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
> { return -EINVAL; }
>
> +static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
> +{
> + return NULL;
> +}
> +
I think we can do without those... See my comment in the next patch.
Thanks,
Mathieu
> #endif /* CONFIG_CORESIGHT */
>
> #endif
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-07-19 20:07 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 17:11 [PATCH v2 00/10] coresight: perf: Support for tmc-etr backed buffers Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 01/10] coresight: Fix handling of sinks Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 02/10] coresight: perf: Fix per cpu path management Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 03/10] coresight: perf: Disable trace path upon source error Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 04/10] coresight: tmc-etr: Handle driver mode specific ETR buffers Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 05/10] coresight: tmc-etr: Relax collection of trace from sysfs mode Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 06/10] coresight: Convert driver messages to dev_dbg Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 07/10] coresight: perf: Remove reset_buffer call back for sinks Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 08/10] coresight: perf: Add helper to retrieve sink configuration Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-19 20:07 ` Mathieu Poirier [this message]
2018-07-19 20:07 ` Mathieu Poirier
2018-07-20 8:43 ` Suzuki K Poulose
2018-07-20 8:43 ` Suzuki K Poulose
2018-07-23 16:50 ` Mathieu Poirier
2018-07-23 16:50 ` Mathieu Poirier
2018-07-17 17:11 ` [PATCH v2 09/10] coresight: perf: Remove set_buffer call back Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-19 20:36 ` Mathieu Poirier
2018-07-19 20:36 ` Mathieu Poirier
2018-07-20 9:04 ` Suzuki K Poulose
2018-07-20 9:04 ` Suzuki K Poulose
2018-07-23 18:22 ` Mathieu Poirier
2018-07-23 18:22 ` Mathieu Poirier
2018-07-23 22:28 ` Suzuki K Poulose
2018-07-23 22:28 ` Suzuki K Poulose
2018-07-24 20:08 ` Mathieu Poirier
2018-07-24 20:08 ` Mathieu Poirier
2018-07-25 9:51 ` Suzuki K Poulose
2018-07-25 9:51 ` Suzuki K Poulose
2018-07-17 17:11 ` [PATCH v2 10/10] coresight: etm-perf: Add support for ETR backend Suzuki K Poulose
2018-07-17 17:11 ` Suzuki K Poulose
2018-07-19 19:59 ` Mathieu Poirier
2018-07-19 19:59 ` Mathieu Poirier
2018-07-20 9:07 ` Suzuki K Poulose
2018-07-20 9:07 ` Suzuki K Poulose
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=20180719200739.GB9421@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=linux-arm-kernel@lists.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 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.