summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorglotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 10:04:44 +0000
committerglotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 10:04:44 +0000
commit8a6abd133d36460597a5ac321ffceecc6949f4ca (patch)
treeef71b6904583a68c39075525eb8d8021a9db15ca /skia
parentffac98794f3300c2b18502d74a9b808f584c959e (diff)
downloadchromium_src-8a6abd133d36460597a5ac321ffceecc6949f4ca.zip
chromium_src-8a6abd133d36460597a5ac321ffceecc6949f4ca.tar.gz
chromium_src-8a6abd133d36460597a5ac321ffceecc6949f4ca.tar.bz2
Note: 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.*. Review URL: https://chromiumcodereview.appspot.com/8770054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/skia.gyp28
1 files changed, 28 insertions, 0 deletions
diff --git a/skia/skia.gyp b/skia/skia.gyp
index d6f0ab1..8cf638b 100644
--- a/skia/skia.gyp
+++ b/skia/skia.gyp
@@ -794,6 +794,13 @@
'../third_party/skia/include/core/SkTypes.h',
],
'conditions': [
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
+ }],
+ ],
+ }],
# For POSIX platforms, prefer the Mutex implementation provided by Skia
# since it does not generate static initializers.
[ 'OS == "android" or OS == "linux" or OS == "mac"', {
@@ -1092,6 +1099,13 @@
'../third_party/skia/src/core',
],
'conditions': [
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
+ }],
+ ],
+ }],
[ 'os_posix == 1 and OS != "mac" and OS != "android" and target_arch != "arm"', {
'cflags': [
'-msse2',
@@ -1120,6 +1134,13 @@
},
{ # arm
'conditions': [
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
+ }],
+ ],
+ }],
[ 'armv7 == 1', {
'defines': [
'__ARM_ARCH__=7',
@@ -1198,6 +1219,13 @@
'-mssse3',
],
}],
+ ['order_profiling != 0', {
+ 'target_conditions' : [
+ ['_toolset=="target"', {
+ 'cflags!': [ '-finstrument-functions' ],
+ }],
+ ],
+ }],
[ 'OS == "mac"', {
'xcode_settings': {
'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES',