public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Move dump_dups_p handling ALAP
@ 2019-01-01  0:00 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01  0:00 UTC (permalink / raw)
  To: dwz, jakub

Hi,

Move dumping of the duplicate chains to the end of the duplicate chain
discovery phase.  This makes sure dumping the duplicate chains still works
if we modify the discovery phase.

Committed to trunk.

Thanks,
- Tom

Move dump_dups_p handling ALAP

2019-12-09  Tom de Vries  <tdevries@suse.de>

	* dwz.c (partition_found_dups): Move dump_dups_p handling ...
	(partition_dups): ... here.

---
 dwz.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/dwz.c b/dwz.c
index f764fca..a08cffe 100644
--- a/dwz.c
+++ b/dwz.c
@@ -5985,11 +5985,6 @@ partition_found_dups (dw_die_ref die, struct obstack *vec)
   obstack_ptr_grow (vec, die);
   if (unlikely (verify_dups_p))
     verify_dups (die, true);
-  if (dump_dups_p)
-    {
-      fprintf (stderr, "duplicate chain:\n");
-      dump_dups (die);
-    }
 }
 
 /* Sort duplication chain for HEAD, assuming the chain was formed by
@@ -6357,6 +6352,14 @@ partition_dups (void)
   if (vec_size != 0)
     {
       dw_die_ref *arr = (dw_die_ref *) obstack_finish (&ob2);
+      if (dump_dups_p)
+	{
+	  for (i = 0; i < vec_size; ++i)
+	    {
+	      fprintf (stderr, "duplicate chain:\n");
+	      dump_dups (arr[i]);
+	    }
+	}
       qsort (arr, vec_size, sizeof (dw_die_ref), partition_cmp);
       if (partition_dups_1 (arr, vec_size, &first_partial_cu,
 			    &last_partial_cu, false))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-09 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [committed] Move dump_dups_p handling ALAP Tom de Vries

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).