From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Add --devel-dump-dups
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20191201090918.GA31379@delia> (raw)
Hi,
Add an option --devel-dump-dups that prints the duplicate chains:
...
$ dwz min --devel-dump-dups
duplicate chain:
4a O e00eb67a e00eb67a int base_type
9c O e00eb67a e00eb67a int base_type
...
Committed to trunk.
Thanks,
- Tom
Add --devel-dump-dups
2019-11-30 Tom de Vries <tdevries@suse.de>
* dwz.c (dump_dups): New var.
(partition_find_dups): Dump duplicate chains if dump_dups.
(dwz_options): Add --devel-dump-dups.
---
dwz.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dwz.c b/dwz.c
index e92e9d8..93c8736 100644
--- a/dwz.c
+++ b/dwz.c
@@ -156,11 +156,13 @@ static int tracing;
static int ignore_size;
static int ignore_locus;
static int dump_dies_p;
+static int dump_dups;
#else
#define tracing 0
#define ignore_size 0
#define ignore_locus 0
#define dump_dies_p 0
+#define dump_dups 0
#endif
static int unoptimized_multifile;
static int save_temps = 0;
@@ -5929,6 +5931,15 @@ partition_find_dups (struct obstack *vec, dw_die_ref parent)
}
child->die_nextdup = prev;
obstack_ptr_grow (vec, child);
+ if (dump_dups)
+ {
+ fprintf (stderr, "duplicate chain:\n");
+ {
+ dw_die_ref d;
+ for (d = child; d; d = d->die_nextdup)
+ dump_die (d);
+ }
+ }
}
else if (child->die_named_namespace)
partition_find_dups (vec, child);
@@ -13060,6 +13071,7 @@ static struct option dwz_options[] =
{ "devel-ignore-locus",no_argument, &ignore_locus, 1 },
{ "devel-save-temps", no_argument, &save_temps, 1 },
{ "devel-dump-dies", no_argument, &dump_dies_p, 1 },
+ { "devel-dump-dups", no_argument, &dump_dups, 1 },
{ "devel-unoptimized-multifile",
no_argument, &unoptimized_multifile, 1 },
{ "devel-verify-edges",no_argument, &verify_edges_p, 1 },
reply other threads:[~2019-12-01 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191201090918.GA31379@delia \
--to=tdevries@suse.de \
--cc=dwz@sourceware.org \
--cc=jakub@redhat.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).