public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/27673] New: [debuginfod] Handle source requests for same buildid more efficiently
Date: Wed, 31 Mar 2021 14:45:21 +0000	[thread overview]
Message-ID: <bug-27673-10460@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27673

            Bug ID: 27673
           Summary: [debuginfod] Handle source requests for same buildid
                    more efficiently
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: debuginfod
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Consider the following debuginfod usage session from gdb (reported in gdb
PR27667):
...
$ time gdb -batch -q ./mi-sym-info -ex start -ex "interpreter-exec mi
111-symbol-info-functions" > OUTPUT
TRYING DEBUGINFO FOR: /data/gdb_versions/devel/system-supplied DSO at
0x7ffff7fca000
BUILDID: e77a560007595d823e2c5a34697c0b0ae1ffc767
TOOK: 0.000084 seconds
RESULT fd: 16
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/config/i386/sfp-exceptions.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.601374 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/libgcc2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.486450 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/libgcc2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.493712 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/libgcc2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.487850 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/libgcc2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.488300 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/libgcc2.c
BUILDID: 7076274fc469c32fa8f4201f467447da3ad2b6be
TOOK: 0.493761 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/addtf3.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.486202 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/divtf3.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.485941 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/eqtf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.477989 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/extenddftf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.487699 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/fixtfdi.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.488412 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/fixtfsi.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.496897 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/floatditf.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.492576 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/floatsitf.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.477747 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/floatunsitf.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.480452 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/getf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.487295 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/letf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.479365 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/multf3.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.486071 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/subtf3.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.478588 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/trunctfdf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.479030 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/trunctfsf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.485941 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/trunctfxf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.493175 seconds
RESULT fd: -2
TRYING SOURCE:
/home/abuild/rpmbuild/BUILD/gcc-10.2.1+git1331/obj-x86_64-suse-linux/x86_64-suse-linux/libgcc/../../../libgcc/soft-fp/unordtf2.c
BUILDID: d34928e1b5c7bde5e269e47349ade7369a3efa83
TOOK: 0.706890 seconds
RESULT fd: -2
TRYING SOURCE:
/usr/src/debug/kernel-default-5.11.6-1.4.x86_64/linux-5.11/linux-obj/../arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c
BUILDID: e77a560007595d823e2c5a34697c0b0ae1ffc767
TOOK: 0.000152 seconds
RESULT fd: 17
TRYING SOURCE:
/usr/src/debug/kernel-default-5.11.6-1.4.x86_64/linux-5.11/linux-obj/../arch/x86/entry/vdso/vclock_gettime.c
BUILDID: e77a560007595d823e2c5a34697c0b0ae1ffc767
TOOK: 0.000094 seconds
RESULT fd: 17
TRYING SOURCE:
/usr/src/debug/kernel-default-5.11.6-1.4.x86_64/linux-5.11/linux-obj/../arch/x86/entry/vdso/vgetcpu.c
BUILDID: e77a560007595d823e2c5a34697c0b0ae1ffc767
TOOK: 0.000117 seconds
RESULT fd: 17
TRYING SOURCE:
/usr/src/debug/kernel-default-5.11.6-1.4.x86_64/linux-5.11/linux-obj/../arch/x86/include/asm/vdso/gettimeofday.h
BUILDID: e77a560007595d823e2c5a34697c0b0ae1ffc767
TOOK: 0.000061 seconds
RESULT fd: 17
TRYING SOURCE:
/usr/src/debug/glibc-2.33-4.1.x86_64/io/../sysdeps/unix/sysv/linux/wordsize-64/../fstatvfs.c
BUILDID: 7076274fc469c32fa8f4201f467447da3ad2b6be
TOOK: 0.000068 seconds
RESULT fd: 17
TRYING SOURCE:
/usr/src/debug/glibc-2.33-4.1.x86_64/io/../sysdeps/unix/sysv/linux/wordsize-64/../statvfs.c
BUILDID: 7076274fc469c32fa8f4201f467447da3ad2b6be
TOOK: 0.000054 seconds
RESULT fd: 17
TRYING SOURCE: /home/abuild/rpmbuild/BUILD/glibc-2.33/csu/elf-init.c
BUILDID: 00ef641a70731291619bdc1ae4badda60c853386
TOOK: 0.492776 seconds
RESULT fd: -2

real    0m17.807s
user    0m6.203s
sys     0m0.137s
...

If the results are found (fd >= 0), they are quick because they're in the
cache.

There's a PR open about caching negative results, PR25628. That would help, at
least the second time.

But there's another observation to be made: there's a number of files for which
-2 fd is returned with the same buildid.  If the server would reply to an
ENOENT source request with a list of files contained in the buildid, then the
client would have the information to answer that request, as well as subsequent
requests using the same buildid.  AFAIU, this ties in somewhat with PR27277. 

Taking the idea further, a more bandwith-hungry variant would be to answer any
source request with the source archive, after which any source query for that
buildid can be dealt with by the client.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-03-31 14:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 14:45 vries at gcc dot gnu.org [this message]
2021-03-31 14:58 ` [Bug debuginfod/27673] " fche at redhat dot com
2021-03-31 15:00 ` fche at redhat dot com
2021-03-31 15:33 ` vries at gcc dot gnu.org
2021-03-31 16:03 ` fche at redhat dot com
2021-03-31 16:41 ` vries at gcc dot gnu.org
2021-04-01  6:06 ` vries at gcc dot gnu.org
2021-12-03 21:52 ` fche at redhat dot com
2022-01-19 23:50 ` fche at redhat dot com

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=bug-27673-10460@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).