DescriptionStatic initializers tool for Windows
A tool to print out static initializers in the format below.
These static initializers cause problems for some sneakier CRT initialization
tricks we do, and they also were measured to have an appreciable slowdown
on startup time (at least on CrOS) so generally trending towards 0 is
desirable.
The basic approach is looking for symbols that have the magic VS name
`dynamic initializer for ' which is the demangled name that's used for
global C++ initializers. The binary is processed by using the DIA SDK
(some of the code is from the Dia2Dump sample), which means that the
target binary requires being built with symbols for this tool to work.
The intention is that a run of this tool will be hooked into the 'sizes'
step on clobber builders on the waterfall, similar to Linux and Mac.
===
Static initializers in a.exe:
d:\src\cr2\src\tools\win\static-initializers\a.obj: `dynamic initializer for 'std::_Error_objects<int>::_Generic_object''
d:\src\cr2\src\tools\win\static-initializers\a.obj: `dynamic initializer for 'std::_Error_objects<int>::_Iostream_object''
d:\src\cr2\src\tools\win\static-initializers\a.obj: `dynamic initializer for 'std::_Error_objects<int>::_System_object''
d:\src\cr2\src\tools\win\static-initializers\a.obj: `dynamic initializer for 'std::num_put<char,std::back_insert_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::id''
...
===
See https://code.google.com/p/chromium/issues/detail?id=341941#c7 for logs of those found in Chromium.
R=cpu@chromium.org
BUG=341941
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251144
Patch Set 1 : \ #Patch Set 2 : include_dirs #Patch Set 3 : reitveld #Patch Set 4 : reitveld #
Total comments: 18
Patch Set 5 : fixes #
Messages
Total messages: 8 (0 generated)
|