From: "Jan Vraný" <Jan.Vrany@labware.com>
To: "tom@tromey.com" <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 5/7] gdb: update blockvector::lookup to handle non-contiguous blocks
Date: Tue, 3 Mar 2026 11:06:38 +0000 [thread overview]
Message-ID: <b8bd7ad5237aa626c67f3de913b6a40183c2d5e3.camel@labware.com> (raw)
In-Reply-To: <87pl5z1ib0.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]
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
[-- Attachment #2: blocks_in_linear_phase_gdb_lto.png --]
[-- Type: image/png, Size: 23123 bytes --]
next prev parent reply other threads:[~2026-03-03 11:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 18:56 [PATCH 0/7] Remove addrmap from blockvector Jan Vrany
2026-02-19 18:56 ` [PATCH 1/7] gdb: implement readnow_functions::find_pc_sect_compunit_symtab Jan Vrany
2026-02-19 20:01 ` Tom Tromey
2026-02-20 12:36 ` Jan Vraný
2026-02-20 14:25 ` Tom Tromey
2026-02-20 15:57 ` Jan Vraný
2026-02-19 18:56 ` [PATCH 2/7] gdb: update expanded_symbols_functions::find_pc_sect_compunit_symtab Jan Vrany
2026-02-19 20:02 ` Tom Tromey
2026-02-19 18:56 ` [PATCH 3/7] gdb: simplify find_compunit_symtab_for_pc_sect Jan Vrany
2026-02-19 20:02 ` Tom Tromey
2026-02-20 12:40 ` Jan Vraný
2026-02-20 14:25 ` Tom Tromey
2026-02-26 15:00 ` Jan Vraný
2026-02-19 18:56 ` [PATCH 4/7] gdb: do not set blockvector address map Jan Vrany
2026-02-19 20:03 ` Tom Tromey
2026-02-20 12:42 ` Jan Vraný
2026-02-19 18:56 ` [PATCH 5/7] gdb: update blockvector::lookup to handle non-contiguous blocks Jan Vrany
2026-02-19 20:06 ` Tom Tromey
2026-02-19 20:20 ` Tom Tromey
2026-02-20 13:03 ` Jan Vraný
2026-02-20 16:38 ` Tom Tromey
2026-03-03 11:06 ` Jan Vraný [this message]
2026-03-09 15:52 ` Jan Vraný
2026-02-19 18:56 ` [PATCH 6/7] gdb: remove address map from struct blockvector Jan Vrany
2026-02-19 18:56 ` [PATCH 7/7] gdb: add unit test for blockvector::lookup of non-contiguous blocks Jan Vrany
2026-02-19 20:12 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8bd7ad5237aa626c67f3de913b6a40183c2d5e3.camel@labware.com \
--to=jan.vrany@labware.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox