From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by sourceware.org (Postfix) with ESMTPS id 515553858C53 for ; Fri, 13 Oct 2023 08:58:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 515553858C53 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=jetbrains.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jetbrains.com Received: by mail-ua1-x936.google.com with SMTP id a1e0cc1a2514c-7b605706bb0so804451241.3 for ; Fri, 13 Oct 2023 01:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetbrains.com; s=googleapps; t=1697187483; x=1697792283; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VOt1xDspXd7dKPyU8jE6n0jgUwXB3S2IA2ebdp2zOqw=; b=Sr6GmVhn58NG42XlE9v2TfLZ8BCTdHYvhL69kEPqW7s9k2t5LEdKL7+83g5dcgWYaa 7UQ4qmijPSt+LdsvXMegQDYaN3X3pjvVNo9m3fYIAmQFwdYX2osNIVo+1lb5OV4v4bTq 3U56Bkq8V/Za7zE8wufOPPM/Dw8icbGmvuoLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697187483; x=1697792283; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VOt1xDspXd7dKPyU8jE6n0jgUwXB3S2IA2ebdp2zOqw=; b=H9oQjyRnMxbkqyNQ9elS4PrPSSQRdTqsygbYCUg8MXvHVLRBvJX7CkVZ4PabRrltDZ 9i7ve0LzN7A9wLAu79OzSG2Jj30Liml/Da4nPjPitKOgkgaYMIACz2WBWjm8FnD4ECXF gAQHJJUB0DBeS5gvtOYoOTKuPPVt8eDhwlTH1UTaesEcG9IdZjGgUPTg26BIs+sp1uG3 hCg8mB7+KzOzMOHEwgsNEXtOrhalSJFl0bZ8Mn0ZmE11t6xoop9O3K1whD3NDIWy2MoZ RK4jTbBO7tx+OvX6XuTUT9zpv5kXbvVejnqs8b/mVbgDtplFtIuAky0XU9KptWB3k3hj osyg== X-Gm-Message-State: AOJu0Yy8DD8n3X9ahPr4UcnwwzXvdiB0LZp4czZNMML261PUYjpZ8cdy QpOE5qSCQXEHdpcrYTj4Q4dtobvIsCGthOX2I2hFwshKWuNvYN1tsi0= X-Google-Smtp-Source: AGHT+IG7iiEI56kf6aOkoyxmNeH4MmwJwZbSYweG0gjdanoa3gXxdddxf3d3cVGmqIfsjckXlfQpIRievj0+CuX3u5o= X-Received: by 2002:a67:e192:0:b0:457:c10a:28d5 with SMTP id e18-20020a67e192000000b00457c10a28d5mr1570889vsl.20.1697187483401; Fri, 13 Oct 2023 01:58:03 -0700 (PDT) MIME-Version: 1.0 References: <87351ak5kt.fsf@tromey.com> In-Reply-To: From: Dmitry Neverov Date: Fri, 13 Oct 2023 10:57:53 +0200 Message-ID: Subject: Re: Index files are not used in the session where they were created To: Tom Tromey Cc: Dmitry Neverov via Gdb Content-Type: multipart/alternative; boundary="00000000000010ed3f06079541ec" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000010ed3f06079541ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tom, I've debugged it a bit more and the number of CUs is indeed different. Without indexes gdb loads 506 CUs during one slow symbol lookup, with indexes no CUs are loaded ('qf_require_partial_symbols()' returns empty list inside 'objfile::lookup_symbol'). Is it something expected? If not, could you please suggest how to debug it further? On Tue, Aug 1, 2023 at 8:42=E2=80=AFAM Dmitry Neverov wrote: > Tom> To figure this out, we'd probably need a test case. Maybe comparing > the > Tom> results between the two scenarios with "set debug symtab-create on" > Tom> would indicate something. > > I have a reproducer, but it is somewhat tricky to build. It is > also not my program, so I'm not sure if I can simplify it. > > The program is KiCad (https://gitlab.com/kicad/code/kicad.git). > Build dependencies for Ubuntu can be obtained from the packaging > files: https://dev-docs.kicad.org/en/build/linux/#_dependencies. > > Once KiCad is built I run the following commands in gdb: > > (gdb) file /home/nd/w/CLionProjects/kicad/build/debug/pcbnew/pcbnew > (gdb) b /home/nd/w/CLionProjects/kicad/pcbnew/footprint_edit_frame.cpp:114 > (gdb) run > > When KiCad's window is opened I invoke the menu item "Tools > > Footprint Editor" to hit the created breakpoint, and then run: > > (gdb) interpreter-exec mi2 "-var-create var1_this * \"this\"" > (gdb) interpreter-exec mi2 "-var-list-children --all-values \"var1_this\" > -1 -1" > (gdb) interpreter-exec mi2 "-var-list-children --all-values > \"var1_this.private\" 0 8" > > The last command takes most of the time. The .gdbinit only sets up loggin= g: > > set trace-commands on > set logging overwrite on > set logging debugredirect on > set logging enabled on > set debug symtab-create 1 > > I've captured the logs, they are quite big, the zip (15Mb) is here: > > https://drive.google.com/file/d/1Cz-HOOqus6xwf_eIjBqcs727w8aOqco4/view?us= p=3Dsharing > . > > There are 3 files in archive: > > - gdb.txt.index-cache-disabled - the slow run with index-cache > disabled > > - gdb.txt.index-cache-enabled-run1 - the first run with > index-cache enabled - it is still slow > > - gdb.txt.index-cache-enabled-run2 - the second run with > index-cache enabled - fast > > --00000000000010ed3f06079541ec--