Deduplicated read-only string constants are ~2.8MB on Android. |
||
Issue description
Dump from pasko@ and lizeb@ investigation:
Strings are large. Here's how much:
$ zcat out/Release/lib.unstripped/libchrome.so.map.gz | less
[...]
.rodata 0x02572700 0x5e3ca0
** merge strings
0x02572700 0x2ad68b
[...]
Dumping the strings:
$ dd if=out/Release/lib.unstripped/libchrome.so of=strings.txt bs=1 skip=39266048 count=2807435
(0x02572700 == 39266048, 0x2ad68b == 2807435)
$ $EDITOR strings.txt
From a visual inspection:
- Lots of things from __FILE__:__LINE__
- Error messages
- Shader source code
- JNI signature for registration: >67K
- Tracing event names, histograms: >140K
Most of it looks "infrequently" used. At the same time, .rodata is almost always loaded in memory, and marked executable (same segment as .text), hence hard to evict for the kernel.
,
Mar 28 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2c54d7c39e35b846e4ce1b94511d69360587bb0c commit 2c54d7c39e35b846e4ce1b94511d69360587bb0c Author: Egor Pasko <pasko@chromium.org> Date: Wed Mar 28 16:12:48 2018 Add include guards to trace_event_common.h This should silence a new presubmit warning. Bug: 801182 Change-Id: I52561c17c7fe874a2d784d14c86b39ac6dc2bf20 Reviewed-on: https://chromium-review.googlesource.com/981143 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/master@{#546511} [modify] https://crrev.com/2c54d7c39e35b846e4ce1b94511d69360587bb0c/base/trace_event/common/trace_event_common.h
,
Jan 11
Available, but no owner or component? Please find a component, as no one will ever find this without one. |
||
►
Sign in to add a comment |
||
Comment 1 by pasko@chromium.org
, Jan 11 2018