* [Bug default/24274] New: low-mem files processed in multifile mode
@ 2019-01-01 0:00 vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24274] " vries at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24274
Bug ID: 24274
Summary: low-mem files processed in multifile mode
Product: dwz
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: default
Assignee: nobody at sourceware dot org
Reporter: vries at gcc dot gnu.org
CC: dwz at sourceware dot org
Target Milestone: ---
Consider four executables, a.out and b.out a hello world example, and c.out and
d.out copied from the dwz executable itself:
...
$ gcc hello.c -g ; cp a.out b.out
$ cp dwz c.out ; cp c.out d.out
...
This gives us two executables with 130 DIEs, and two executables with 5356
DIEs:
...
$ readelf -w a.out | grep '(DW_TAG' | wc -l
130
$ readelf -w b.out | grep '(DW_TAG' | wc -l
130
$ readelf -w c.out | grep '(DW_TAG' | wc -l
5356
$ readelf -w d.out | grep '(DW_TAG' | wc -l
5356
...
Now consider a gdb script that traces the dwz invocations:
...
$ cat gdb.script
b dwz
commands
continue
end
run
...
We run in multifile mode, with a low-mem limit of 1000 dies, and trace into
LOG:
...
$ gdb \
-batch \
-x gdb.script \
--args dwz -m3 -l1000 a.out b.out c.out d.out \
> LOG 2>&1
...
which we then summarize as follows:
...
$ grep 'dwz (' LOG | awk '{print $5}'
"a.out",
"b.out",
"c.out",
"c.out",
"d.out",
"d.out",
"a.out",
"b.out",
"c.out",
"d.out",
...
The first 6 invocations are according to plan:
- a.out and b.out have fewer DIEs than 1000, and are processed.
- c.out and d.out have more DIEs than 1000, and are each processed twice:
- once in regular mode (where dwz stops at a 1000 processed DIEs and returns
2), and
- once in low-mem mode.
However, then all 4 files are once more processed in fi_multifile mode, while
the intention is that c.out and d.out (being bigger than the low-mem limit) are
not processed anymore.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/24274] low-mem files processed in multifile mode
2019-01-01 0:00 [Bug default/24274] New: low-mem files processed in multifile mode vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24274] " vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2021-02-19 0:08 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24274
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at redhat dot com
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
AFAIU, there is code intended to prevent this scenario from happening at the
end of dwz:
...
free (dso);
if (ret == 0 && !low_mem)
res->res = 0;
return ret;
...
But the low_mem condition is never true here, because cleanup is run before
arriving there, which sets multifile_mode to 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/24274] low-mem files processed in multifile mode
2019-01-01 0:00 [Bug default/24274] New: low-mem files processed in multifile mode vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24274] " vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2021-02-19 0:08 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24274
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
posted patch: https://sourceware.org/ml/dwz/2019-q1/msg00058.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/24274] low-mem files processed in multifile mode
2019-01-01 0:00 [Bug default/24274] New: low-mem files processed in multifile mode vries at gcc dot gnu.org
@ 2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24274
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Reclassifying as enhancement.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug default/24274] low-mem files processed in multifile mode
2019-01-01 0:00 [Bug default/24274] New: low-mem files processed in multifile mode vries at gcc dot gnu.org
` (2 preceding siblings ...)
2019-01-01 0:00 ` vries at gcc dot gnu.org
@ 2021-02-19 0:08 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-02-19 0:08 UTC (permalink / raw)
To: dwz
https://sourceware.org/bugzilla/show_bug.cgi?id=24274
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
Has an unreviewed patch, see Comment #2
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-19 0:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [Bug default/24274] New: low-mem files processed in multifile mode vries at gcc dot gnu.org
2019-01-01 0:00 ` [Bug default/24274] " vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2021-02-19 0:08 ` mark at klomp dot org
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).