From 170c5cfc3af8d3eb1e331d656b69fd3f84653e97 Mon Sep 17 00:00:00 2001 From: Tor Vic Date: Tue, 2 Nov 2021 00:44:44 +0100 Subject: [PATCH] Increase number of vp counters per site When doing a PGO kernel-defconfig build, the following warning pops up: `Unable to track new values: Running out of static counters. Consider using option -mllvm -vp-counters-per-site= to allocate more value profile counters at compile time.` Use the cmake LLVM_VP_COUNTERS_PER_SITE to increase counters to 6. This is an arbitrary value, a lower number may be sufficient. --- build-llvm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build-llvm.py b/build-llvm.py index 5de8ce71..9224defa 100755 --- a/build-llvm.py +++ b/build-llvm.py @@ -956,6 +956,7 @@ def stage_specific_cmake_defines(args, dirs, stage): if instrumented_stage(args, stage): defines['LLVM_BUILD_INSTRUMENTED'] = 'IR' defines['LLVM_BUILD_RUNTIME'] = 'OFF' + defines['LLVM_VP_COUNTERS_PER_SITE'] = '6' # If we are at the final stage, use PGO/Thin LTO if requested if stage == get_final_stage(args):