perf/x86/intel/bts: Allocate bts_ctx only if necessary

Avoid unnecessary per-CPU memory allocation on unsupported CPUs,
this can save 12K memory for each CPU

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20250122074103.3091-1-lirongqing@baidu.com
This commit is contained in:
Li RongQing 2025-01-22 15:41:03 +08:00 • committed by Ingo Molnar
commit 3acfcefa79