DescriptionMove InspectorBackendDispatcher::commandNames array from .data to .rodata section
Move InspectorBackendDispatcher::commandNames array from .data to .rodata section
by getting rid of the pointers / relocations and using 1 single const char array
for all command names. An index array was introduced to store the index of each
command name in the char array.
This effectively moves commandNames array from .data to .rodata:
- Before: (.rodata: 8788 bytes / .data: 880 bytes)
- After: (.rodata: 9669 bytes / .data: 0 bytes)
The binary size is up 1 byte but we moved 880 bytes to shareable readonly memory,
thus potentially reducing RAM usage on Android a bit.
This change also reduces the number of relocations by ~220 according to relinfo,
which decreases the load time of the library.
BUG=249746
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160734
Patch Set 1 #Patch Set 2 : Improve code readability #Patch Set 3 : Reenable compile assertion #
Messages
Total messages: 6 (0 generated)
|