From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by sourceware.org (Postfix) with ESMTPS id 169133858C53 for ; Tue, 1 Aug 2023 06:42:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 169133858C53 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-vs1-xe2c.google.com with SMTP id ada2fe7eead31-4475ae93951so1896899137.0 for ; Mon, 31 Jul 2023 23:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetbrains.com; s=googleapps; t=1690872153; x=1691476953; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PNZ5J+pyFmF4Mp9yB84dQvpZ9AoFRuaGxAlFektPkC0=; b=Szn8hrrkp6DtX+tmXDc97m/qPTbZEUBrc13yDkJZGSLZ5OAMXBy9gos4FdEgI4RlJR 8h7p4IzCwppxrx9A/FkvnsnCGXumqhZ4ZHT8tmKXVsjjE+tS71RKNu3+LN5ZeFgpRpvB s8awsDOvr6KmZiEsFPWAZ5YOLJrMYsCPtTzNs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690872153; x=1691476953; 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=PNZ5J+pyFmF4Mp9yB84dQvpZ9AoFRuaGxAlFektPkC0=; b=W2WHGrW8ncQa6IJWuAMEQ5vsFqBJcOX4lZ7RyiTRxE2bALINJ116lOV2uKeea0Y4K+ ZE4/TWUgoRDUOKW9y0jmIucmlEq/KCrFBewp7ahltLuwYQEv+MGKxBMF5Kgu1L+y8BPe ei5p16xZgCr+z/+RiN22/EssNzmMsO6SSI6ZJc0lXuYsux4HnJL96fomg28A5PQtIRxj MUn0sfewohKryFwV+fYsjotsaYKpyFqj6cBC+8dyzHAGdixLV73hiEWKpD4xhIA0QkRI k947R0fjLS1IMhrS9a7YBxq9AiL3wKEPaqQHjmdKFKfz7DfVy3Iq5qR1za1+y14cwl6E nq5w== X-Gm-Message-State: ABy/qLYideEhY0rbjKRU65pyPBSIYSeyt/IPguT6u78hMz6JzdPP39Vm DNkcxtWNSLKyjRYKmgLg4KFJl+ha8L6XCjkrrpWRVqerGI66O9dbnIY= X-Google-Smtp-Source: APBJJlG/WUcm3N1Jvgmzlk802TNcYahMfHIZg0r5pjA6LMcDbgcGK2PgscqK1t6/hry1n9wePXaT6LrqHEK9R4lzkSQ= X-Received: by 2002:a67:ec96:0:b0:440:de70:6c10 with SMTP id h22-20020a67ec96000000b00440de706c10mr1420614vsp.14.1690872152772; Mon, 31 Jul 2023 23:42:32 -0700 (PDT) MIME-Version: 1.0 References: <87351ak5kt.fsf@tromey.com> In-Reply-To: <87351ak5kt.fsf@tromey.com> From: Dmitry Neverov Date: Tue, 1 Aug 2023 08:42:22 +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="00000000000006efa20601d6dae1" X-Spam-Status: No, score=-1.9 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,T_SCC_BODY_TEXT_LINE 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: --00000000000006efa20601d6dae1 Content-Type: text/plain; charset="UTF-8" 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 logging: 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?usp=sharing . 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 --00000000000006efa20601d6dae1--