From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752851AbcDUWA1 (ORCPT ); Thu, 21 Apr 2016 18:00:27 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:34065 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752658AbcDUWAY (ORCPT ); Thu, 21 Apr 2016 18:00:24 -0400 MIME-Version: 1.0 In-Reply-To: <5718FB80.90205@arm.com> References: <1460483692-25061-1-git-send-email-mathieu.poirier@linaro.org> <1460483692-25061-15-git-send-email-mathieu.poirier@linaro.org> <5718FB80.90205@arm.com> Date: Thu, 21 Apr 2016 16:00:22 -0600 Message-ID: Subject: Re: [PATCH V2 14/15] coresight: tmc: implementing TMC-ETR AUX space API From: Mathieu Poirier To: Suzuki K Poulose Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21 April 2016 at 10:10, Suzuki K Poulose wrote: > On 12/04/16 18:54, Mathieu Poirier wrote: >> >> This patch implement the AUX area interfaces required to >> use the TMC (configured as an ETR) from the Perf sub-system. >> >> The heuristic is heavily borrowed from the ETB10 and TMC-ETF >> implementation. >> >> Signed-off-by: Mathieu Poirier > > >> +static void tmc_update_etr_buffer(struct coresight_device *csdev, >> + struct perf_output_handle *handle, >> + void *sink_config) >> +{ >> + struct cs_etr_buffers *buf = sink_config; >> + >> + /* >> + * An ETR configured to work in contiguous memory mode works the >> same >> + * was as an ETB or ETF. >> + */ >> + tmc_update_etf_buffer(csdev, handle, &buf->tmc); > > > Really ? I thought the ETR stores the data to the allocated System RAM and > can > be read directly from the memory than using the RRD ? Using an ETR in contiguous mode is inefficient to start with. Regardless of the approach taken trace data has to be copied to perf's non-contiguous ring buffer pages. It would be more efficient to copy bigger chunks of data to the ring buffer (because we can), but I rather spend my time enabling scatter-gather mode than optimizing a sub-optimal mode of operation. This currently work and enables people to use the IP block while scatter-gather mode is in flight. I should probably make that clear in the commit log. Thanks, Mathieu > > Suzuki > > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.poirier@linaro.org (Mathieu Poirier) Date: Thu, 21 Apr 2016 16:00:22 -0600 Subject: [PATCH V2 14/15] coresight: tmc: implementing TMC-ETR AUX space API In-Reply-To: <5718FB80.90205@arm.com> References: <1460483692-25061-1-git-send-email-mathieu.poirier@linaro.org> <1460483692-25061-15-git-send-email-mathieu.poirier@linaro.org> <5718FB80.90205@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21 April 2016 at 10:10, Suzuki K Poulose wrote: > On 12/04/16 18:54, Mathieu Poirier wrote: >> >> This patch implement the AUX area interfaces required to >> use the TMC (configured as an ETR) from the Perf sub-system. >> >> The heuristic is heavily borrowed from the ETB10 and TMC-ETF >> implementation. >> >> Signed-off-by: Mathieu Poirier > > >> +static void tmc_update_etr_buffer(struct coresight_device *csdev, >> + struct perf_output_handle *handle, >> + void *sink_config) >> +{ >> + struct cs_etr_buffers *buf = sink_config; >> + >> + /* >> + * An ETR configured to work in contiguous memory mode works the >> same >> + * was as an ETB or ETF. >> + */ >> + tmc_update_etf_buffer(csdev, handle, &buf->tmc); > > > Really ? I thought the ETR stores the data to the allocated System RAM and > can > be read directly from the memory than using the RRD ? Using an ETR in contiguous mode is inefficient to start with. Regardless of the approach taken trace data has to be copied to perf's non-contiguous ring buffer pages. It would be more efficient to copy bigger chunks of data to the ring buffer (because we can), but I rather spend my time enabling scatter-gather mode than optimizing a sub-optimal mode of operation. This currently work and enables people to use the IP block while scatter-gather mode is in flight. I should probably make that clear in the commit log. Thanks, Mathieu > > Suzuki > > >