Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447301
| From | Suzuki K Poulose <Suzuki.Poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/10] coresight: etm-perf: pass struct perf_event to source::enable/disable() |
| Date | 2016-07-20 17:40 +0200 |
| Message-ID | <rX1Lj-3cG-3@gated-at.bofh.it> (permalink) |
| References | <rWmRP-26O-1@gated-at.bofh.it> <rWmRQ-26O-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 18/07/16 20:51, Mathieu Poirier wrote:
> With this commit [1] address range filter information is now found
> in the struct hw_perf_event::addr_filters. As such pass the event
> itself to the coresight_source::enable/disable() functions so that
> both event attribute and filter can be accessible for configuration.
>
> [1] 'commit 375637bc5249 ("perf/core: Introduce address range filtering")'
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 385d62e64abb..2a5982c37dfb 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -232,8 +232,9 @@ struct coresight_ops_source {
> int (*cpu_id)(struct coresight_device *csdev);
> int (*trace_id)(struct coresight_device *csdev);
> int (*enable)(struct coresight_device *csdev,
> - struct perf_event_attr *attr, u32 mode);
> - void (*disable)(struct coresight_device *csdev);
> + struct perf_event *event, u32 mode);
> + void (*disable)(struct coresight_device *csdev,
> + struct perf_event *event);
nit:
Should we make this a a bit more generic API rather than hard coding
the perf stuff in there ? i.e,
how about :
int (*enable)(struct coresight_device *csdev, void *data, u32 mode)
void (*disable)(struct coresight_device *csdev, void *data, u32 mode)
where data is specific to the mode of operation. That way the API is
cleaner and each mode could pass their own data (even though sysfs
doesn't use any at the moment).
Suzuki
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/10] coresight: implementing address filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 09/10] coresight: etm4x: adding configurable start/stop filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 06/10] coresight: etm4x: adding range filter configuration function Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 04/10] coresight: etm4x: split default and filter configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 10/10] coresight: documenting range and start/stop filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 02/10] coresight: remove duplicated enumeration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 07/10] coresight: etm4x: configuring include/exclude function Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 01/10] coresight: etm-perf: pass struct perf_event to source::enable/disable() Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
Re: [PATCH 01/10] coresight: etm-perf: pass struct perf_event to source::enable/disable() Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-07-20 17:40 +0200
Re: [PATCH 01/10] coresight: etm-perf: pass struct perf_event to source::enable/disable() Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-21 17:30 +0200
[PATCH 03/10] coresight: etm-perf: configuring filters from perf core Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
Re: [PATCH 03/10] coresight: etm-perf: configuring filters from perf core Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-07-20 18:10 +0200
Re: [PATCH 03/10] coresight: etm-perf: configuring filters from perf core Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-21 17:20 +0200
Re: [PATCH 03/10] coresight: etm-perf: configuring filters from perf core Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-21 19:20 +0200
[PATCH 05/10] coresight: etm4x: cleaning up default filter configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
[PATCH 08/10] coresight: etm4x: adding configurable address range filtering Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 22:00 +0200
csiph-web