[PATCH] perf cs-etm: Improve version detection and error reporting

Leo Yan leo.yan at linux.dev
Tue Apr 30 12:51:24 PDT 2024


On Tue, Apr 30, 2024 at 02:32:21PM +0100, James Clark wrote:
> When the config validation functions are warning about ETMv3, they do it
> based on "not ETMv4". If the drivers aren't all loaded or the hardware
> doesn't support Coresight it will appear as "not ETMv4" and then Perf
> will print the error message "... not supported in ETMv3 ..." which is
> wrong and confusing.
> 
> cs_etm_is_etmv4() is also misnamed because it also returns true for
> ETE because ETE has a superset of the ETMv4 metadata files. Although
> this was always done in the correct order so it wasn't a bug.
> 
> Improve all this by making a single get version function which also
> handles not present as a separate case. Change the ETMv3 error message
> to only print when ETMv3 is detected, and add a new error message for
> the not present case.
> 
> Signed-off-by: James Clark <james.clark at arm.com>

Reviewed-by: Leo Yan <leo.yan at linux.dev>



More information about the linux-arm-kernel mailing list