From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24483 invoked by alias); 9 Jan 2020 14:21:03 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 24473 invoked by uid 89); 9 Jan 2020 14:21:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2688 X-Spam-Status: No, score=-25.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx2.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Wed, 01 Jan 2020 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Add --devel-dump-pus Message-ID: <20200109142054.GA3681@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2020-q1/txt/msg00018.txt Hi, Add an option --devel-dump-pus to print information about which duplicate chains have been selected by partition_dups to be copied into partial units. Output looks like this: ... $ dwz hello --devel-dump-pus Partial unit (phase one): 60 O 6649b943 6649b943 long unsigned int base_type 75 O e00eb67a e00eb67a int base_type 81 O 7df8cdbf 7df8cdbf long int base_type 88 O 6fe25160 6fe25160 char base_type Partial unit (phase one): 4b O 6737a1ef 6737a1ef unsigned char base_type 52 O 168f1291 168f1291 short unsigned int base_type 59 O 8b473491 8b473491 unsigned int base_type 67 O 4ab0f4e6 4ab0f4e6 signed char base_type 6e O 8a462495 8a462495 short int base_type ... Committed to trunk. Thanks, - Tom Add --devel-dump-pus 2020-01-09 Tom de Vries * dwz.c (dump_pus_p): New variable. (partition_dups_1): Handle dump_pus_p. (dwz_options, usage): Add dump_pus_p entry. --- dwz.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dwz.c b/dwz.c index 99ef704..0087ac7 100644 --- a/dwz.c +++ b/dwz.c @@ -190,6 +190,7 @@ static int ignore_size; static int ignore_locus; static int dump_dies_p; static int dump_dups_p; +static int dump_pus_p; static int verify_dups_p; static int verify_edge_freelist; static int stats_p; @@ -199,6 +200,7 @@ static int stats_p; #define ignore_locus 0 #define dump_dies_p 0 #define dump_dups_p 0 +#define dump_pus_p 0 #define verify_dups_p 0 #define stats_p 0 #endif @@ -6819,6 +6821,9 @@ partition_dups_1 (dw_die_ref *arr, size_t vec_size, else stats->pu_ph2_cnt++; } + if (dump_pus_p) + fprintf (stderr, "Partial unit (%s):\n", + second_phase ? "phase two" : "phase one"); partial_cu->cu_kind = CU_PU; partial_cu->cu_offset = *last_partial_cu == NULL ? 0 : (*last_partial_cu)->cu_offset + 1; @@ -6848,6 +6853,8 @@ partition_dups_1 (dw_die_ref *arr, size_t vec_size, continue; if (odr && odr_mode != ODR_BASIC) arr[k] = reorder_dups (arr[k]); + if (dump_pus_p) + dump_die (arr[k]); child = copy_die_tree (die, arr[k]); if (stats_p) stats->pu_toplevel_die_cnt++; @@ -14310,6 +14317,7 @@ static struct option dwz_options[] = { "devel-save-temps", no_argument, &save_temps, 1 }, { "devel-dump-dies", no_argument, &dump_dies_p, 1 }, { "devel-dump-dups", no_argument, &dump_dups_p, 1 }, + { "devel-dump-pus", no_argument, &dump_pus_p, 1 }, { "devel-unoptimized-multifile", no_argument, &unoptimized_multifile, 1 }, { "devel-verify-edges",no_argument, &verify_edges_p, 1 }, @@ -14555,6 +14563,7 @@ usage (void) " --devel-ignore-locus\n" " --devel-save-temps\n" " --devel-dump-dies\n" + " --devel-dump-dups\n" " --devel-unoptimized-multifile\n" " --devel-verify-dups\n" " --devel-verify-edges\n"