I just noticed that this message somehow did not make it to gdb-patches, not sure why. On Fri, 2026-02-20 at 09:38 -0700, Tom Tromey wrote: > > > > Jan> TBH I have no idea. How common is this, how many ranges blocks have, nor > Jan> how to force compiler to produce such binary. Maybe torturing the compiler > Jan> with -O3 and PGO? > > Yeah, maybe just an optimized LTO build of gdb would show it. I tried to build with PGO but no success so I resorted to LTO build and wrote a script to get some data: # CUs 1263 # CUs with addr map 1075 # blocks 654629 # blocks with multiple ranges: 270730 Max # blocks in linear phase: 42 Avg # blocks in linear phase: 2.372987707844722 Med # blocks in linear phase: 1 Here "blocks in linear phase" means number of blocks that start at the same address, which is the worst case. Assuming my thinking and script is correct, in little more than 50% cases there's only one block in linear phase, in 17% cases there are 2 blocks, in 23% cases there are 3 to 5 blocks (histogram attached). Jan