From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Only apply die limits in regular mode
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20191125143919.GA5259@delia> (raw)
Hi,
In off_htab_add_die we have:
...
if (low_mem
|| op_multifile
|| estimated_nr_dies >= low_mem_die_limit
|| estimated_nr_dies >= max_die_limit)
initial_size = default_initial_size;
...
Die limits are only supposed to apply in regular mode, but the formulation
allows the limits to apply in read_multifile and finalize_multifile mode as
well.
I don't think this can trigger a difference in behaviour in finalize_multifile
mode, but it might in read_multifile mode.
Fix this by only testing die limits in regular mode.
Committed to trunk.
Thanks,
- Tom
Only apply die limits in regular mode
2019-11-25 Tom de Vries <tdevries@suse.de>
* dwz.c (off_htab_add_die): Only test die limits in regular mode.
---
dwz.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dwz.c b/dwz.c
index c8e43b7..5aab860 100644
--- a/dwz.c
+++ b/dwz.c
@@ -1284,8 +1284,9 @@ off_htab_add_die (dw_cu_ref cu, dw_die_ref die)
size_t initial_size;
if (low_mem
|| op_multifile
- || estimated_nr_dies >= low_mem_die_limit
- || estimated_nr_dies >= max_die_limit)
+ || (multifile_mode == 0
+ && (estimated_nr_dies >= low_mem_die_limit
+ || estimated_nr_dies >= max_die_limit)))
initial_size = default_initial_size;
else
{
reply other threads:[~2019-11-25 14:39 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=20191125143919.GA5259@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).