From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [PATCH] Add multifile-low-mem.sh test-case
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <20190317160215.GA23199@delia> (raw)
Jakub,
When I run dwz in multifile mode for files 1, 2 and 3 with a low-mem-die-limit
low_mem_limit like so:
...
$ dwz -l$low_mem_limit -m 4 1 2 3
...
where the low-mem-die-limit triggers for file 3, I observed that file 3 is
excluded from wr_multifile mode, but is still included in fi_multifile mode.
The documentation in dwz.c states:
...
If some executable or shared library has too large debug information
(number of DIEs in .debug_info section) that there would be
risk of too high memory consumption, that file isn't multifile
optimized, instead it is processed by dwz () in a low-memory mode
with low_mem flag set.
...
My understanding from the documentation is that the behaviour described above
is a bug, but I'm not sure, it might be an intended feature.
So, my question is: is this a bug?
If so, then I can commit the test-case below as is.
If not, then I can commit the test-case below modified to accept the
[ "$(gnu-debugaltlink-name.sh 3)" = "4" ]
case as expected behaviour and close PR24274 as resolved-invalid.
Thanks,
- Tom
Add multifile-low-mem.sh test-case
Add test-case that tests behaviour of dwz in multifile mode for files
that trigger the low-mem-die-limit.
2019-03-17 Tom de Vries <tdevries@suse.de>
* testsuite/dwz.tests/multifile-low-mem.sh: New test.
---
testsuite/dwz.tests/multifile-low-mem.sh | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/testsuite/dwz.tests/multifile-low-mem.sh b/testsuite/dwz.tests/multifile-low-mem.sh
new file mode 100644
index 0000000..51345be
--- /dev/null
+++ b/testsuite/dwz.tests/multifile-low-mem.sh
@@ -0,0 +1,25 @@
+cp ../hello 1
+cp ../hello 2
+cp ../dwz-for-test 3
+
+low_mem_limit=$(readelf -w 3 \
+ | grep '(DW_TAG' \
+ | wc -l)
+low_mem_limit=$((low_mem_limit - 1))
+
+dwz -l$low_mem_limit -m 4 1 2 3
+
+smaller-than.sh 1 ../hello
+smaller-than.sh 2 ../hello
+smaller-than.sh 3 ../dwz-for-test
+
+[ $(gnu-debugaltlink-name.sh 1) = "4" ]
+[ $(gnu-debugaltlink-name.sh 2) = "4" ]
+
+if [ "$(gnu-debugaltlink-name.sh 3)" = "4" ]; then
+ echo "PR24274 workaround used" > dwz.info
+else
+ [ "$(gnu-debugaltlink-name.sh 3)" = "" ]
+fi
+
+rm -f 1 2 3 4
reply other threads:[~2019-03-17 16:01 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=20190317160215.GA23199@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).