perf/core: Add perf_sample_save_brstack() helper
When we saves the branch stack to the perf sample data, we needs to update the sample flags and the dynamic size. To make sure this is done consistently, add the perf_sample_save_brstack() helper and convert all call sites. Suggested-by: NPeter Zijlstra <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: NAthira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: NPeter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230118060559.615653-5-namhyung@kernel.org
Showing
想要评论请 注册 或 登录