This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Make pretty printers version namespace dependant
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Apr 2017 09:41:01 +0100
- Subject: Re: Make pretty printers version namespace dependant
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 736F080479
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 736F080479
- References: <7e10edf1-2395-3a91-25cf-9382dbe73a0f@gmail.com> <20170427183235.GM5109@redhat.com> <7df48c7b-a23b-d5bc-c6da-34b306e05e1c@gmail.com>
On 27/04/17 21:27 +0200, François Dumont wrote:
On 27/04/2017 20:32, Jonathan Wakely wrote:
On 27/04/17 20:12 +0200, François Dumont wrote:
Hi
Here is the patch to registers Printers depending on activation
of versioned namespace.
2017-04-27 François Dumont <fdumont@gcc.gnu.org>
* python/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE]
(user_versioned_namespace): New.
(gdb.py): Adapt target.
* python/Makefile.in: Regenerate.
* python/hook.in: Likewise.
* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
Register only 1 Printer type depending on _versioned_namespace value.
(add_one_type_printer): Likewise.
(register_libstdcxx_printers): Add parameter use_versioned_namespace.
Adapt _versioned_namespace value based on it.
* testsuite/lib/gdb-test.exp (get_use_versioned_namespace): New.
(note-test): Detect if version namespace is active and pass the
information to register_libstdcxx_printers.
* testsuite/libstdc++-prettyprinters/48362.cc: Replace a regexp-test
by a note-test.
Tested under Linux x86_64, with and without version namespace.
Ok to commit to trunk ?
What's the advantage?
Again, the point of my patch was to optimise if needed. Is it needed?
Oh, I thought it was obviously better to not register useless
Printers. But if you need a bug report or an explicit test showing
that it is better then I don't have it. Maybe a gdb guy could tell us
if it worth it.
I think I've asked t he GDB guys before about the overhead of
printers, but I'll check with them. I don't think having extra
printers registered is a problem (GDB is usually an interactive
program, so the time it takes to find a printer is not significant on
"human scales").
Do I just keep the small cleanup on the useless usage of regexp-test
in 48362.cc ?
That part is fine now, thanks.
Are we going to wait for gcc 7.1 before bumping version namespace ?
Shouldn't we wait until we change something that would require bumping
it? :-)
Ok, I'll add it to my first patch needing it.
Is it the right moment to do so ?
I think changes that only affect the versioned namespace are OK for
trunk now.