From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=jetbrains.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jetbrains.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 34A87385771B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::e32 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetbrains.com; s=googleapps; t=1698249602; x=1698854402; 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=XKG72QeFxeaJcDV09hDj+FWoms4+dunah/3xY/2vwkQ=; b=TuD3w+NHwKBdH8lq9hNpZOznqfQep+1OzC68FK+GktSc4T5x6Tn7zrsm1BBEe8tgNI Av11ZckGW8byo0T8arH5c/cGPEAgG7dqtt+yOrR5RmU4eiXG8xX6rGyS4PlefdsQc/Te FYUJTQRhm4lAr71imRRsAnlJ+JxGxxJUyQ/1M= 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: From: Dmitry Neverov 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 List-Id: 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?