[binutils-gdb] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs
Simon Marchi via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=76f0dd5e7acf5bc160057ed5e50af7cd3ee84e9d commit 76f0dd5e7acf5bc160057ed5e50af7cd3ee84e9d Author: Simon Marchi <[email protected]> Date: Fri Feb 27 22:51:53 2026 -0500 gdb/ctf: add scoped_time_it in elfctf_build_psymtabs This will be useful to determine the impact on the startup time getting rid of partial symtabs has. I use it like so: $ ./gdb -q -nx --data-directory=data-directory -iex "maint set per-command time on" /home/simark/src/linux/vmlinux.unstripped -batch ... Time for "elfctf_build_psymtabs": wall 0.381, user 0.357, sys 0.015, user+sys 0.372, 97.6 % CPU Change-Id: I021319212f27eee0bf0f6c230f4e7cdd9c3602c1 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/ctfread.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/ctfread.c b/gdb/ctfread.c index ed4a7383427..251b1c7f1fc 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -79,6 +79,7 @@ #include "complaints.h" #include "block.h" #include "ctfread.h" +#include "maint.h" #include "psymtab.h" #include "cli/cli-cmds.h" @@ -1576,6 +1577,8 @@ elfctf_build_psymtabs (objfile *objfile) bfd *abfd = objfile->obfd.get (); int err; + scoped_time_it time_it (__func__); + CTF_SCOPED_DEBUG_START_END ("building psymtabs for %s", bfd_get_filename (abfd));