From 7c4674205c1e2ab4106b99e07434ca31687736ac Mon Sep 17 00:00:00 2001 From: synergydev Date: Tue, 13 Aug 2013 17:41:52 -0700 Subject: [PATCH] FDO: Only support locally The issues: - The size increase from utilizing FDO is quite large while utilizing runtime profiles in build. - By default, FDO is utilized globally if the target arch variant profiles exist. - Not all modules can show statistical significance in performance comparison, yet still suffer the size increase. The solution: - Only enable FDO locally with LOCAL_FDO_SUPPORT for modules which may benefit enough to justify the size tradeoff. Solution notes: - I've noted statistical significance in libwebcore and libskia thus far from utilizing FDO. - Analysis included sunspider, drawcanvas benchmarks, as well as gooda analysis on both arm and x86 - To support runtime profile generation in modules which have LOCAL_FDO_SUPPORT specified, BUILD_FDO_INSTRUMENTATION is still used. Otherwise, if the target arch variant profiles exist, FDO is utilized for specified modules. Change-Id: I7e95266943ff47c7d82b02e6200fd09911d0bb57 --- core/binary.mk | 2 +- core/clear_vars.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 3893d03539..d55f8144d5 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -114,7 +114,7 @@ endif #################################################### ## Add FDO flags if FDO is turned on and supported #################################################### -ifeq ($(strip $(LOCAL_NO_FDO_SUPPORT)),) +ifneq ($(strip $(LOCAL_FDO_SUPPORT)),) ifeq ($(strip $(LOCAL_IS_HOST_MODULE)),) LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS) LOCAL_CPPFLAGS += $(TARGET_FDO_CFLAGS) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 7ad58b2e9b..092953ddd5 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -36,7 +36,7 @@ LOCAL_CC:= LOCAL_CXX:= LOCAL_CPP_EXTENSION:= LOCAL_NO_DEFAULT_COMPILER_FLAGS:= -LOCAL_NO_FDO_SUPPORT := +LOCAL_FDO_SUPPORT:= LOCAL_ARM_MODE:= LOCAL_YACCFLAGS:= LOCAL_ASFLAGS:=