[PATCH OLK-5.10 16/24] perf cs-etm: Move mapping of Trace ID and cpu into helper function