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

Issue 137783012: MakeQualifiedNames should generate lazily created arrays for attributes and tags. (Closed)

Created:
6 years, 11 months ago by vivekg_samsung
Modified:
6 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

MakeQualifiedNames should generate lazily created arrays for attributes and tags. The templates MakeQualifiedNames.cpp.tmpl and MakeQualifiedNames.h.tmpl currently generate local static arrays for the tags and the attributes. Currently these arrays hold pointers to the global data and these arrays are declared as static. Due to this static declaration, the sections .rel.dyn and .data.rel.ro will allocate the bytes equal to the size of the array. Even though these functions may not be called upon, the binary would still be loaded with allocation of that much amount of data. Making these arrays as non-static and allocating them lazily, we are able to save about 4.2KB size in these sections. * With the patch, we save - = 2880 bytes in .rel.dyn = 1440 bytes in .data.rel.ro * Total size increases by - = 384 bytes Using the tool relinfo.pl from [1] we get: * About 360 relocations are avoided by the patch. * About 360 relatives are avoided by the patch. [1] http://www.akkadia.org/drepper/relinfo.pl BUG=249746 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165316

Patch Set 1 #

Total comments: 4

Patch Set 2 : Patch using PassOwnPtr instead of local arrays. #

Total comments: 3

Patch Set 3 : Patch for landing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -21 lines) Patch
M Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl View 1 2 2 chunks +8 lines, -10 lines 0 comments Download
M Source/build/scripts/templates/MakeQualifiedNames.h.tmpl View 1 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/html/parser/HTMLTreeBuilder.cpp View 1 3 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
vivekg
The size data per section is shown in [1]. This data was taken for ChromiumTestShellTestApk ...
6 years, 11 months ago (2014-01-15 12:29:01 UTC) #1
Inactive
Very similar to my patch at: https://codereview.chromium.org/51983003/ Could you please measure the impact on the ...
6 years, 11 months ago (2014-01-15 15:19:54 UTC) #2
Inactive
On 2014/01/15 15:19:54, Chris Dumez wrote: > Very similar to my patch at: > https://codereview.chromium.org/51983003/ ...
6 years, 11 months ago (2014-01-15 15:27:14 UTC) #3
vivekg
On 2014/01/15 15:19:54, Chris Dumez wrote: > Very similar to my patch at: > https://codereview.chromium.org/51983003/ ...
6 years, 11 months ago (2014-01-15 15:30:35 UTC) #4
Inactive
https://codereview.chromium.org/137783012/diff/1/Source/build/scripts/templates/MakeQualifiedNames.h.tmpl File Source/build/scripts/templates/MakeQualifiedNames.h.tmpl (right): https://codereview.chromium.org/137783012/diff/1/Source/build/scripts/templates/MakeQualifiedNames.h.tmpl#newcode30 Source/build/scripts/templates/MakeQualifiedNames.h.tmpl:30: void get{{namespace}}Tags(WebCore::QualifiedName* tags[], unsigned length); Passing the length here ...
6 years, 11 months ago (2014-01-15 19:27:02 UTC) #5
vivekg_samsung
Updated the patch. I am getting around 360 relocations saved with this patch. Using either ...
6 years, 11 months ago (2014-01-16 10:27:21 UTC) #6
Inactive
Also, please update the Changelog to indicate the overall impact on binary size. There is ...
6 years, 11 months ago (2014-01-16 14:37:46 UTC) #7
vivekg
Thanks Chris for the review. Incorporated all the changes and updated the patch. PTAL.
6 years, 11 months ago (2014-01-16 22:52:17 UTC) #8
Inactive
lgtm: - The impact on the overall binary size is minimal - It moves data ...
6 years, 11 months ago (2014-01-17 13:57:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vivek.vg@samsung.com/137783012/250001
6 years, 11 months ago (2014-01-17 14:46:22 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 15:52:43 UTC) #11
Message was sent while issue was closed.
Change committed as 165316

Powered by Google App Engine
This is Rietveld 408576698