linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: alexander.shishkin@linux.intel.com (Alexander Shishkin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers
Date: Fri, 11 Dec 2015 17:18:46 +0200	[thread overview]
Message-ID: <87zixhau95.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <1449176702-13213-22-git-send-email-mathieu.poirier@linaro.org>

Mathieu Poirier <mathieu.poirier@linaro.org> writes:

> +static void etm_event_start(struct perf_event *event, int flags)
> +{
> +	int cpu = smp_processor_id();
> +	struct etm_cpu_data *cpu_data;
> +	struct etm_event_data *event_data;
> +	struct perf_output_handle *handle = this_cpu_ptr(&ctx_handle);
> +	struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
> +
> +	if (!csdev)
> +		goto fail;
> +
> +	/*
> +	 * Deal with the ring buffer API and get a handle on the
> +	 * session's information.
> +	 */
> +	event_data = perf_aux_output_begin(handle, event);
> +	if (WARN_ON_ONCE(!event_data))
> +		goto fail;

Hmm, perf_aux_output_begin() returning NULL is not WARN-worthy and is
actually a normal situation, for example, if the buffer is not
configured yet (which like I suggested in the other email should be a
separate thing from the *event* configuration).

perf_aux_output_begin() will also return NULL if there's no room in the
buffer.

Regards,
--
Alex

  reply	other threads:[~2015-12-11 15:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 21:04 [PATCH V6 00/26] Coresight integration with perf Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 01/26] coresight: etm3x: moving etm_readl/writel to header file Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 02/26] coresight: etm3x: moving sysFS entries to dedicated file Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 03/26] coresight: etm3x: unlocking tracers in default arch init Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 04/26] coresight: etm3x: splitting struct etm_drvdata Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 05/26] coresight: etm3x: implementing 'cpu_id()' API Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 06/26] coresight: associating path with session rather than tracer Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 07/26] coresight: moving PM runtime operations to core framework Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 08/26] coresight: etm3x: adding operation mode for etm_enable() Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 09/26] coresight: add API to get sink from path Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 10/26] coresight: etm3x: set progbit to stop trace collection Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 11/26] coresight: etm3x: changing default trace configuration Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 12/26] coresight: etm3x: consolidating initial config Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 13/26] coresight: etm3x: implementing user/kernel mode tracing Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 14/26] coresight: etm3x: adding perf_get/set_config() API Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 15/26] coresight: etm3x: implementing perf_enable/disable() API Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 16/26] coresight: etb10: moving to local atomic operations Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 17/26] coresight: adding operation mode for sink->enable() Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 18/26] coresight: etb10: implementing AUX space API Mathieu Poirier
2015-12-11 14:00   ` Alexander Shishkin
2015-12-11 21:17     ` Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 19/26] coresight: updating documentation to reflect integration with perf Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 20/26] perf: changing pmu::setup_aux() parameter to include event Mathieu Poirier
2015-12-11 14:12   ` Alexander Shishkin
2015-12-11 21:58     ` Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers Mathieu Poirier
2015-12-11 15:18   ` Alexander Shishkin [this message]
2015-12-11 21:18     ` Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 22/26] coresight: introducing a global trace ID function Mathieu Poirier
2015-12-03 21:04 ` [PATCH V6 23/26] perf tools: making function set_max_cpu_num() non static Mathieu Poirier
2015-12-03 21:05 ` [PATCH V6 24/26] perf tools: adding perf_evlist to *info_priv_size() Mathieu Poirier
2015-12-03 21:05 ` [PATCH V6 25/26] perf tools: making coresight PMU listable Mathieu Poirier
2015-12-03 21:05 ` [PATCH V6 26/26] perf tools: adding coresight etm PMU record capabilities Mathieu Poirier
2015-12-08 20:24 ` [PATCH V6 00/26] Coresight integration with perf Mathieu Poirier
2015-12-08 20:29 ` Mathieu Poirier
2015-12-08 20:34   ` Arnaldo Carvalho de Melo
2015-12-10 21:27     ` 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=87zixhau95.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --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 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).