public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Add --devel-force
Date: Wed, 01 Jan 2020 00:00:00 -0000	[thread overview]
Message-ID: <20200213141231.GA29115@delia> (raw)

Hi,

We can have the following message from dwz:
...
$ dwz a.out
dwz: a.out: DWARF compression not beneficial \
  - old size 69158054 new size 69158333
...

Given that the compression is not beneficial, no output is generated. However,
it may be interesting to have a look at the output, to understand why the
compression is not beneficial.

Add a developer-only option --devel-force that forces generation of output,
even if compression is not beneficial.

Committed to trunk.

Thanks,
- Tom

Add --devel-force

ChangeLog:

2020-02-13  Tom de Vries  <tdevries@suse.de>

	* dwz.c (force_p): New var.
	(dwz): Use force_p.
	(dwz_options, usage): Add --devel-force entry.

---
 dwz.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dwz.c b/dwz.c
index 35d3072..86d35b0 100644
--- a/dwz.c
+++ b/dwz.c
@@ -211,6 +211,7 @@ static int dump_edges_p = 0;
 static int partition_dups_opt;
 static int progress_p;
 static int import_opt_p = 1;
+static int force_p = 0;
 enum die_count_methods
 {
   none,
@@ -13679,7 +13680,7 @@ dwz (const char *file, const char *outfile, struct file_result *res,
 	  cleanup ();
 	  ret = 1;
 	}
-      else if (!ignore_size
+      else if (!(ignore_size || force_p)
 	       && ((debug_sections[DEBUG_INFO].new_size
 		    + debug_sections[DEBUG_ABBREV].new_size
 		    + debug_sections[DEBUG_STR].new_size
@@ -14495,6 +14496,7 @@ static struct option dwz_options[] =
   { "devel-progress",	 no_argument,	    &progress_p, 1 },
   { "devel-ignore-size", no_argument,	    &ignore_size, 1 },
   { "devel-ignore-locus",no_argument,	    &ignore_locus, 1 },
+  { "devel-force",	 no_argument,	    &force_p, 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_p, 1 },
@@ -14747,6 +14749,7 @@ usage (void)
        "  --devel-stats\n"
        "  --devel-ignore-size\n"
        "  --devel-ignore-locus\n"
+       "  --devel-force\n"
        "  --devel-save-temps\n"
        "  --devel-dump-dies\n"
        "  --devel-dump-dups\n"

                 reply	other threads:[~2020-02-13 14:12 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=20200213141231.GA29115@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).