Messages in this thread | | | Subject | Re: [PATCH v2 7/9] perf cs-etm: Create ETE decoder | From | James Clark <> | Date | Wed, 25 Aug 2021 11:13:34 +0100 |
| |
On 24/08/2021 09:33, Leo Yan wrote: >> +static void cs_etm_decoder__gen_ete_config(struct cs_etm_trace_params *params, >> + ocsd_ete_cfg *config) >> +{ >> + config->reg_configr = params->ete.reg_configr; >> + config->reg_traceidr = params->ete.reg_traceidr; >> + config->reg_idr0 = params->ete.reg_idr0; >> + config->reg_idr1 = params->ete.reg_idr1; >> + config->reg_idr2 = params->ete.reg_idr2; >> + config->reg_idr8 = params->ete.reg_idr8; >> + config->reg_devarch = params->ete.reg_devarch; >> + config->arch_ver = ARCH_AA64; > Just a nitpick: if we connect with patch 02, it implement function > cs_etm_decoder__get_etmv4_arch_ver(). We can extend it to a more > general function cs_etm_decoder__get_arch_ver(); this can allow us to > have a central place to calculate 'arch_ver' for different archs. > > I understand your patch doesn't want to mix things between ETMv4 and > ETE, either way is okay for me:
Hi Leo,
Yes that was one of the previous comments from Mike that the logic only applied to ETMv4 so I made it v4 specific. The other arch_vers are fixed at the moment. If we get a new one that needs changing depending on some config we can try to add a generic function.
> > Reviewed-by: Leo Yan <leo.yan@linaro.org> >
| |