Static 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 Review URL: https://codereview.chromium.org/66613003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251144 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment