This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 04/40] Fix TAB-completion + .gdb_index slowness (generalize filename_seen_cache)
- From: Pedro Alves <palves at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>, gdb-patches at sourceware dot org
- Date: Mon, 17 Jul 2017 11:51:38 +0100
- Subject: Re: [PATCH 04/40] Fix TAB-completion + .gdb_index slowness (generalize filename_seen_cache)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 69B20C04B303
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 69B20C04B303
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-5-git-send-email-palves@redhat.com> <5967DAEA.1060304@redhat.com> <1dbe1bfa-6fe0-0e3c-843c-3f93f87ccb54@redhat.com>
On 07/14/2017 08:40 PM, Pedro Alves wrote:
> I was about to push it when I realized that I missed releasing the
> new heap-allocated dwarf2_per_objfile::filenames_cache...
>
> To address that, I made it possible for dwarf2_per_objfile to be
> a non-POD:
>
> https://sourceware.org/ml/gdb-patches/2017-07/msg00202.html
>
> and made dwarf2_per_objfile::filenames_cache an optional, so the
> cache object (though not its elements) is on the obstack too.
>
> Here's the updated patch.
The dwarf2_per_objfile patch is in, so I pushed this one in too,
with a tiny comment update to mention the reason for the optional:
/* Table containing all filenames. This is an optional because the
table is lazily constructed on first access. */
gdb::optional<filename_seen_cache> filenames_cache;
Thanks much for the review, Keith.
--
Pedro Alves