public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Dmitry Neverov <dmitry.neverov@jetbrains.com>
To: Tom Tromey <tom@tromey.com>
Cc: Dmitry Neverov via Gdb <gdb@sourceware.org>
Subject: Re: Index files are not used in the session where they were created
Date: Wed, 25 Oct 2023 17:59:51 +0200	[thread overview]
Message-ID: <CAEY59_LRnM6+k3P1Niy+KxuEMxYDEhxYstXuDAVmieTVbAuv=g@mail.gmail.com> (raw)
In-Reply-To: <CAEY59_LGJSVikf7L76EzsMQN8Mra5gcoa0Qj7SaxKSPac6fpyw@mail.gmail.com>

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<wxBitmapBundleImpl>'. 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<wxBitmapBundleImpl> 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<wxBitmapBundleImpl>' 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?

  reply	other threads:[~2023-10-25 16:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  8:01 Dmitry Neverov
2023-07-26 16:20 ` Tom Tromey
2023-08-01  6:42   ` Dmitry Neverov
2023-10-13  8:57     ` Dmitry Neverov
2023-10-25 15:59       ` Dmitry Neverov [this message]
2023-11-01 17:51         ` Tom Tromey
2023-11-06 10:41           ` Dmitry Neverov
2023-11-13 16:59           ` Dmitry Neverov
2023-11-15 10:18           ` Dmitry Neverov

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='CAEY59_LRnM6+k3P1Niy+KxuEMxYDEhxYstXuDAVmieTVbAuv=g@mail.gmail.com' \
    --to=dmitry.neverov@jetbrains.com \
    --cc=gdb@sourceware.org \
    --cc=tom@tromey.com \
    /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).