Bug 689069 - Disable frame pointer for Skia arm optimized functions. r=jrmuizel
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 28 Oct 2011 20:05:42 +1300
changeset 79355 7a6b1c88a6cefce12de5ea30e3ebe3144f21fe37
parent 79354 d2fce6b656e14333a5798e51aed4c89cd975f3b7
child 79356 2b40846bc3c85746fcb92ffabc09478b467054de
push id2969
push usermwoodrow@mozilla.com
push dateFri, 28 Oct 2011 07:13:51 +0000
treeherdermozilla-inbound@b79b68029f1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs689069
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 689069 - Disable frame pointer for Skia arm optimized functions. r=jrmuizel
gfx/skia/arm-opts.patch
gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
gfx/skia/update.sh
new file mode 100644
--- /dev/null
+++ b/gfx/skia/arm-opts.patch
@@ -0,0 +1,41 @@
+diff --git a/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp b/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
+--- a/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
++++ b/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
+@@ -549,17 +549,17 @@ static void S32A_Opaque_BlitRow32_neon(S
+ #define	S32A_Opaque_BlitRow32_PROC	S32A_Opaque_BlitRow32_neon
+ 
+ #else
+ 
+ #ifdef TEST_SRC_ALPHA
+ #error The ARM asm version of S32A_Opaque_BlitRow32 does not support TEST_SRC_ALPHA
+ #endif
+ 
+-static void S32A_Opaque_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
++static void  __attribute((noinline,optimize("-fomit-frame-pointer"))) S32A_Opaque_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
+                                   const SkPMColor* SK_RESTRICT src,
+                                   int count, U8CPU alpha) {
+ 
+     SkASSERT(255 == alpha);
+ 
+     /* Does not support the TEST_SRC_ALPHA case */
+     asm volatile (
+                   "cmp    %[count], #0               \n\t" /* comparing count with 0 */
+@@ -646,17 +646,17 @@ static void S32A_Opaque_BlitRow32_arm(Sk
+                   );
+ }
+ #define	S32A_Opaque_BlitRow32_PROC	S32A_Opaque_BlitRow32_arm
+ #endif
+ 
+ /*
+  * ARM asm version of S32A_Blend_BlitRow32
+  */
+-static void S32A_Blend_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
++static void __attribute((noinline,optimize("-fomit-frame-pointer"))) S32A_Blend_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
+                                  const SkPMColor* SK_RESTRICT src,
+                                  int count, U8CPU alpha) {
+     asm volatile (
+                   "cmp    %[count], #0               \n\t" /* comparing count with 0 */
+                   "beq    3f                         \n\t" /* if zero exit */
+ 
+                   "mov    r12, #0xff                 \n\t" /* load the 0xff mask in r12 */
+                   "orr    r12, r12, r12, lsl #16     \n\t" /* convert it to 0xff00ff in r12 */
--- a/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
+++ b/gfx/skia/src/opts/SkBlitRow_opts_arm.cpp
@@ -549,17 +549,17 @@ static void S32A_Opaque_BlitRow32_neon(S
 #define	S32A_Opaque_BlitRow32_PROC	S32A_Opaque_BlitRow32_neon
 
 #else
 
 #ifdef TEST_SRC_ALPHA
 #error The ARM asm version of S32A_Opaque_BlitRow32 does not support TEST_SRC_ALPHA
 #endif
 
-static void S32A_Opaque_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
+static void  __attribute((noinline,optimize("-fomit-frame-pointer"))) S32A_Opaque_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
                                   const SkPMColor* SK_RESTRICT src,
                                   int count, U8CPU alpha) {
 
     SkASSERT(255 == alpha);
 
     /* Does not support the TEST_SRC_ALPHA case */
     asm volatile (
                   "cmp    %[count], #0               \n\t" /* comparing count with 0 */
@@ -646,17 +646,17 @@ static void S32A_Opaque_BlitRow32_arm(Sk
                   );
 }
 #define	S32A_Opaque_BlitRow32_PROC	S32A_Opaque_BlitRow32_arm
 #endif
 
 /*
  * ARM asm version of S32A_Blend_BlitRow32
  */
-static void S32A_Blend_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
+static void __attribute((noinline,optimize("-fomit-frame-pointer"))) S32A_Blend_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
                                  const SkPMColor* SK_RESTRICT src,
                                  int count, U8CPU alpha) {
     asm volatile (
                   "cmp    %[count], #0               \n\t" /* comparing count with 0 */
                   "beq    3f                         \n\t" /* if zero exit */
 
                   "mov    r12, #0xff                 \n\t" /* load the 0xff mask in r12 */
                   "orr    r12, r12, r12, lsl #16     \n\t" /* convert it to 0xff00ff in r12 */
--- a/gfx/skia/update.sh
+++ b/gfx/skia/update.sh
@@ -88,8 +88,11 @@ fi
 
 if [ -n "$rev" ]; then
   version=$rev
   sed -i "" "s/r[0-9][0-9][0-9][0-9]/r$version/" README_MOZILLA
 else
   echo "Remember to update README_MOZILLA with the version details."
 fi
 
+# Patch to get arm opts to build with frame pointers enabled. Bug 689069
+patch -p3 < arm-opts.patch
+