Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 48743004: Move InspectorBackendDispatcher::commandNames array from .data to .rodata section (Closed)

Created:
7 years, 1 month ago by Inactive
Modified:
7 years, 1 month ago
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Move 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -18 lines) Patch
M Source/core/inspector/CodeGeneratorInspector.py View 4 chunks +8 lines, -1 line 0 comments Download
M Source/core/inspector/CodeGeneratorInspectorStrings.py View 1 2 5 chunks +17 lines, -8 lines 0 comments Download
M Source/web/WebDevToolsAgentImpl.cpp View 1 1 chunk +9 lines, -9 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Inactive
Diff on the generated InspectorBackendDispatcher.cpp: http://pastebin.com/SswEN57a Unfortunately, this makes the generator code a little bit ...
7 years, 1 month ago (2013-10-28 17:01:33 UTC) #1
pfeldman
lgtm. But I am not sure it was worth the effort.
7 years, 1 month ago (2013-10-28 17:12:36 UTC) #2
Inactive
On 2013/10/28 17:12:36, pfeldman wrote: > lgtm. But I am not sure it was worth ...
7 years, 1 month ago (2013-10-28 17:18:03 UTC) #3
digit1
lgtm On 2013/10/28 17:18:03, Chris Dumez wrote: > One alternative would be to use const ...
7 years, 1 month ago (2013-10-28 17:27:34 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/48743004/60001
7 years, 1 month ago (2013-10-28 17:50:34 UTC) #5
commit-bot: I haz the power
7 years, 1 month ago (2013-10-28 18:39:25 UTC) #6
Message was sent while issue was closed.
Change committed as 160734

Powered by Google App Engine
This is Rietveld 408576698