DescriptionNote: this change does nothing unless order_profiling=1 is manually set in GYP defines (or EXTRA_BUILD_ARGS for cros).
When enabled, this tool is built into Chrome and makes it log its routine invocations. Every time a routine is called and if it is called for the first time (per each thread), the log is updated with current time and the address of the routine. Later, such logs can be merged (across all threads), symbolized and fed into linker ('order_text_section') so it produces binary with more optimal code layout. This must make code work faster because of better CPU cache utilization.
See more technical details in tools/cygprofile/cygprofile.cc header.
Cyg prefix is taken after the callback names in gcc that we use to hook the code: __cyg_profile_func_enter and __cyg_profile_func_exit.
More info at https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
BUG=chromium-os:20187
TEST=units, build cros with
declare -x EXTRA_BUILD_ARGS="order_profiling=1 linux_use_tcmalloc=0"
run it and check the log at /var/log/chrome/cyglog.*.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137391
Patch Set 1 #
Total comments: 13
Patch Set 2 : sync to 18.0.1011 and ongoing work #Patch Set 3 : sync #Patch Set 4 : sync fix #Patch Set 5 : fixed review comments #
Total comments: 2
Patch Set 6 : sync and remove commented code #Patch Set 7 : sync #Patch Set 8 : moved /base/cygprofile to /tools/cygprofile #
Total comments: 4
Messages
Total messages: 16 (0 generated)
|