Gyp flag to disable inlining.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 13 Feb 2014 18:36:36 +0000 (18:36 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 13 Feb 2014 18:36:36 +0000 (18:36 +0000)
To turn off all inlining, rebuild after running the command

$ GYP_DEFINES=skia_disable_inlining=1 ./gyp_skia

Provides an initial value in one GM to avoid an uninitialized variable warning.

BUG=skia:2126
R=scroggo@google.com, mtklein@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/163363004

git-svn-id: http://skia.googlecode.com/svn/trunk@13437 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/shadertext2.cpp
gyp/common_conditions.gypi
gyp/common_variables.gypi

index e8a4c6d..dcff3c6 100644 (file)
@@ -149,7 +149,7 @@ protected:
         for (int s = 0; s < 2; ++s) {
             SkPaint& paint = s ? strokePaint : fillPaint;
 
-            SkScalar columnH;
+            SkScalar columnH = 0;
             for (int m = 0; m < matrices.count(); ++m) {
                 columnH = 0;
                 canvas->save();
index bbf3097..fb97bb2 100644 (file)
               '-Werror',
             ],
           }],
+          # For profiling; reveals some costs, exaggerates others (e.g. trivial setters & getters).
+          [ 'skia_disable_inlining', {
+            'cflags': [
+              '-fno-inline',
+              '-fno-default-inline',
+              '-finline-limit=0',
+              '-fno-omit-frame-pointer',
+            ],
+          }],
           [ 'skia_arch_type == "arm" and arm_thumb == 1', {
             'cflags': [
               '-mthumb',
index 26b9961..d02d465 100644 (file)
     'ios_sdk_version%': '6.0',
     'skia_win_debuggers_path%': '<(skia_win_debuggers_path)',
     'skia_run_pdfviewer_in_gm%': 0,
+    'skia_disable_inlining%': 0,
 
     # These are referenced by our .gypi files that list files (e.g. core.gypi)
     #