DescriptionMakeQualifiedNames 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. #
Messages
Total messages: 11 (0 generated)
|