Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289679
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers |
| Date | Fri, 11 Dec 2015 16:30:01 +0100 |
| Message-ID | <qExNT-6hd-7@gated-at.bofh.it> (permalink) |
| References | <qBJix-1Vy-3@gated-at.bofh.it> <qBJiy-1Vy-9@gated-at.bofh.it> |
| X-Original-To | Mathieu Poirier <mathieu.poirier@linaro.org>, gregkh@linuxfoundation.org |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.20,414,1444719600"; d="scan'208";a="871686377" |
| User-Agent | Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 37 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | zhang.chunyan@linaro.org, mike.leach@arm.com, tor@ti.com, al.grant@arm.com, fainelli@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier <mathieu.poirier@linaro.org> |
| X-Original-Date | Fri, 11 Dec 2015 17:18:46 +0200 |
| X-Original-Message-ID | <87zixhau95.fsf@ashishki-desk.ger.corp.intel.com> |
| X-Original-References | <1449176702-13213-1-git-send-email-mathieu.poirier@linaro.org> <1449176702-13213-22-git-send-email-mathieu.poirier@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1289679 |
Show key headers only | View raw
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers Mathieu Poirier <mathieu.poirier@linaro.org> - 2015-12-03 22:10 +0100
Re: [PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-12-11 16:30 +0100
Re: [PATCH V6 21/26] coresight: etm-perf: new PMU driver for ETM tracers Mathieu Poirier <mathieu.poirier@linaro.org> - 2015-12-11 22:20 +0100
csiph-web