Skip to content

Commit

Permalink
Increase number of vp counters per site
Browse files Browse the repository at this point in the history
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=<n> 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.
  • Loading branch information
torvic9 committed Nov 2, 2021
1 parent 23775a5 commit 170c5cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build-llvm.py
Expand Up @@ -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):
Expand Down

0 comments on commit 170c5cf

Please sign in to comment.