[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210806115200.GD68808@leoy-ThinkPad-X240s>
Date: Fri, 6 Aug 2021 19:52:00 +0800
From: Leo Yan <leo.yan@...aro.org>
To: James Clark <james.clark@....com>
Cc: acme@...nel.org, mathieu.poirier@...aro.org,
coresight@...ts.linaro.org, al.grant@....com,
suzuki.poulose@....com, anshuman.khandual@....com,
mike.leach@...aro.org, John Garry <john.garry@...wei.com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 6/6] perf cs-etm: Print the decoder name
On Fri, Aug 06, 2021 at 10:43:25AM +0100, James Clark wrote:
> On 31/07/2021 08:30, Leo Yan wrote:
> >> @@ -658,7 +658,7 @@ cs_etm_decoder__create_etm_decoder(struct cs_etm_decoder_params *d_params,
> >>
> >> return 0;
> >> } else if (d_params->operation == CS_ETM_OPERATION_PRINT) {
> >> - if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder_name,
> >> + if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder->decoder_name,
> >> OCSD_CREATE_FLG_PACKET_PROC,
> >> trace_config, &csid))
> >> return -1;
> >> @@ -790,3 +790,8 @@ void cs_etm_decoder__free(struct cs_etm_decoder *decoder)
> >> decoder->dcd_tree = NULL;
> >> free(decoder);
> >> }
> >> +
> >> +const char *cs_etm_decoder__get_name(struct cs_etm_decoder *decoder)
> >> +{
> >> + return decoder->decoder_name;
> >> +}
> > Maybe can consider to place this function into the header file with
> > "static inline" specifier.
>
> I tried this, but because the struct is defined in the .c file it can't
> be done without moving the struct to the header. It's also only used
> for the --dump-raw-trace path so performance isn't critical anyway.
It's fine to keep current patch, and thanks for trying.
Powered by blists - more mailing lists