From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hAvBGKE7OWVTozYAWB0awg (envelope-from ) for ; Wed, 25 Oct 2023 12:00:33 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=tK9Iknbv; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 572441E0C1; Wed, 25 Oct 2023 12:00:33 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 45B521E00F for ; Wed, 25 Oct 2023 12:00:31 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DEAC53856092 for ; Wed, 25 Oct 2023 16:00:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEAC53856092 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698249630; bh=XKG72QeFxeaJcDV09hDj+FWoms4+dunah/3xY/2vwkQ=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=tK9IknbvdxOXRaWgBsi3xRDV0msbV2dkD+LieVFEBuPfkr+0luCx0p71GMFLOX3WW jtmP1B8GsKfOKI3ttcGSYqX3+89SGh1l10lKcXMtuKgZJmUAGBFYd1GJpIQ45j7V5y zPE6qOt2XbZtDPqLVrLU+DRMM28RAJHuFwGbTzxw= Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) by sourceware.org (Postfix) with ESMTPS id 34A87385771B for ; Wed, 25 Oct 2023 16:00:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34A87385771B ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 34A87385771B ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698249605; cv=none; b=qBR3+Se23XiQQ5rpgadJqlY0joSMAA+xOVkbE6hO4pI3mk2Ll2QxLBKBg32Vof8+1Uy+QqmdbTCyv8/CADeoWMqv4+Adtsq7iuHn4VZKZgb/lIT3jISAjJBf8Or7ZR6rp7PWc9fp6musU3OMe0OJWbcpwtdOjjUmnXiqboijacg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698249605; c=relaxed/simple; bh=XKG72QeFxeaJcDV09hDj+FWoms4+dunah/3xY/2vwkQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=ZuW3gyZXRHsWBYW/RLz3U6mqDTCCfYGVh7Tu46d3eHvuxSg9oaoZlsiu5Zz+cAl563N3oFSxAeK2/mzrvkeTzK8SNa9id/b674ycwJwCDtCTjyNbHrP3o5he1+LJV415ZGZhUbn+5LVt7+mosHS/9fI4xSD/uDP+ad2trB3ddLk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-45853ab5556so2093806137.2 for ; Wed, 25 Oct 2023 09:00:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698249602; x=1698854402; 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=XKG72QeFxeaJcDV09hDj+FWoms4+dunah/3xY/2vwkQ=; b=LzCx+nz7xXex/yxsFzjJRxf1h8kNmS25z9rbrJOIrm0xOXjcxmAylAlqxd5vluUSe2 TYTj42as14LDaJCFbqc3GtB+9S9ltetgdGJDK3XYaNqcJK3Q7N8s45DRy7OOxDtmPoPU CAZqJB4AiLBGLiDG4YKfcikMNd/x6jTrX+jZZisgPcdoXF15IwNbknxvh03tBVClohMe 29lJFHthvTMmp7Fukvm03jSuh4U8m4CaTFZ0tOhew382bzD3xs9HrqdqL1e8TG9Rclhm K78QqjXxdqJyChGTQdwbBUO7SPRioitA9imkc41gV+bPGT4Wac0silmgAIBQZFcB0cEC F7Cg== X-Gm-Message-State: AOJu0Yy+fpJqSG5UGX+PnFVAW418OhupU1xaqdcdPIip8pL0XizIYomi f+jDCsmO+A4VdQBZxWgoz6q1O7O+mGLkthsxTKoTirJCMiBRVgRzDrU= X-Google-Smtp-Source: AGHT+IGy2vhX9YESHveCpgBw/9zJVwXqmQZfefEl9RLCDKgQ+jqZ2nSMp70C7oMkQBKz2Uty8EOHD+BSfxULF0bLnzA= X-Received: by 2002:a05:6102:105d:b0:458:64ae:fc1a with SMTP id h29-20020a056102105d00b0045864aefc1amr15616364vsq.19.1698249602302; Wed, 25 Oct 2023 09:00:02 -0700 (PDT) MIME-Version: 1.0 References: <87351ak5kt.fsf@tromey.com> In-Reply-To: Date: Wed, 25 Oct 2023 17:59:51 +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: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Dmitry Neverov via Gdb Reply-To: Dmitry Neverov Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Please ignore my previous message regarding an empty qf_require_partial_symbols(). I think I was wrong and now understand a bit better where the difference in time comes from. In my case lookup is slow for a symbol with name wxObjectDataPtr. When index is not used, the cooked_index_functions::expand_symtabs_matching() finds many entries of the form 'wxObjectDataPtr'. Such entries don't have a parent entry, and so they cannot be filtered out, and the dw2_expand_symtabs_matching_one() is called. Inside the expansion callback (lambda in objfile::lookup_symbol) the block_find_symbol() is called which eventually calls cp_fq_symbol_name_matches(). cp_fq_symbol_name_matches() takes templates into account and decides that wxObjectDataPtr doesn't actually match the wxObjectDataPtr, and so no symbols from symtab match. When index is used, the check for templates happens in dw2_expand_symtabs_matching_symbol(). The name_matcher (default_symbol_name_matcher) is called before deciding to expand the symtab. So entries like 'wxObjectDataPtr' don't cause expansion for lookup name wxObjectDataPtr. I wonder if it is possible to check templates before symtab expansion in the no-index case as well?