[PATCH v9 1/3] perf: cs-etm: Move mapping of Trace ID and cpu into helper function