public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: Giuliano Procida <gprocida@google.com>
Cc: libabigail@sourceware.org,  kernel-team@android.com,
	 maennich@google.com
Subject: Re: [PATCH v2] abg-reader.cc: track WIP types by pointer not name
Date: Thu, 09 Jul 2020 14:58:12 +0200	[thread overview]
Message-ID: <87fta0rgkb.fsf@seketeli.org> (raw)
In-Reply-To: <20200622172504.27660-1-gprocida@google.com> (Giuliano Procida's message of "Mon, 22 Jun 2020 18:25:04 +0100")

Hello,

Giuliano Procida <gprocida@google.com> a écrit:

> When reading ABI XML files, the reader needs to construct types
> progressively as any type may depend on other types and even on
> itself. Such work-in-progress types are tracked explicitly.

Right.

Though I looked at this in details and I think this whole WIP tracking
is useless now, in the abixml reader so we might as well get rid of it
altogether.

It was used back in the old days because there was no type
de-duplication in abixml so the volume of types seen by the abixml
reader could be really huge some times.  So delaying type
canonicalization had a big impact, potentially.  So canonicalizing for a
WIP struct or function type was delayed until all the abixml file is
read.  Now in the code, all structs and function types are delayed
anyway, irrespective of their WIP-ness.  And we received no complaints
of slowness from the abixml reader.

So really, I am going to just dump the support for tracking WIP types in
the abixml reader altogether.  I am nervous about doing the same from
the DWARF reader, though, as we can see *many* more types from DWARF
because of all the duplication inherent to how the DWARF is generated at
the moment.

So I think this patch, altough valid, won't be necessary as the WIP
types tracking is going away.

>
> The storage used for this is a map from (external, qualified) type
> name to a count of how many times the type (name) has been seen.
>
> However, function type names are invariably stored as "void ()" as
> they are incomplete at the point they are added to the map. When the
> reader later attempts to remove the marking they have their proper,
> different names. In short, the code doesn't do what it's supposed to.
>

Right, I agree.  This WIP thing wasdesigned before the support for
function types was added.  And yes, the string representation of a
function types changes during its WIP life-cycle so clearly using that
representation to designate it is problematic.

So really, let's just dump the support for WIP type tracking from the
abixml reader.

I'll send a patch for that right away.

Thanks!

[...]

Cheers,

-- 
		Dodji

      parent reply	other threads:[~2020-07-09 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 16:06 [PATCH] " Giuliano Procida
2020-06-22 17:25 ` [PATCH v2] " Giuliano Procida
2020-06-22 20:06   ` Matthias Maennich
2020-07-09 12:58   ` Dodji Seketeli [this message]

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=87fta0rgkb.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=gprocida@google.com \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.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).