lkml.org 
[lkml]   [2021]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 6/6] perf cs-etm: Print the decoder name
    From
    Date


    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.

    James

    >
    > Either way, this patch looks good to me:
    >
    > Reviewed-by: Leo Yan <leo.yan@linaro.org>
    >

    \
     
     \ /
      Last update: 2021-08-06 11:45    [W:3.094 / U:0.700 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site