perf/core: Introduce perf_prepare_header()
Factor out perf_prepare_header() so that it can call perf_prepare_sample() without a header if not needed. Also it checks the filtered_sample_type to avoid duplicate work when perf_prepare_sample() is called twice (or more). Suggested-by: NPeter Zijlstr <peterz@infradead.org> Signed-off-by: NNamhyung Kim <namhyung@kernel.org> Signed-off-by: NIngo Molnar <mingo@kernel.org> Tested-by: NJiri Olsa <jolsa@kernel.org> Acked-by: NJiri Olsa <jolsa@kernel.org> Acked-by: NSong Liu <song@kernel.org> Acked-by: NPeter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230118060559.615653-8-namhyung@kernel.org
Showing
想要评论请 注册 或 登录