Skip to content
Snippets Groups Projects
Commit 2eebfdf9 authored by Zhizhou Yang's avatar Zhizhou Yang
Browse files

Update patch files for bp files of benchmarks

The patches for adding flags to benchmarks were out-of-date and caused
patch error while building the benchmarks. For now we still keep these
diffs to add flags.
Fixed them by renewing the patches for binder, dex2oat, hwui, and skia.

Bug: http://b/73090194
Test: Tested and succeeded on all benchmarks.
Change-Id: Icd9160dfcb651fa35f9b3dc1c687c246e19891fe
parent 8e6687fd
Branches
No related tags found
No related merge requests found
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index f7347aef1..a539fac47 100644
index 57c87756e..0f34bcff7 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -52,10 +52,12 @@ cc_library {
@@ -80,7 +80,9 @@ cc_library {
"-Wall",
"-Wextra",
"-Werror",
......@@ -11,33 +11,4 @@ index f7347aef1..a539fac47 100644
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
product_variables: {
binder32bit: {
- cflags: ["-DBINDER_IPC_32BIT=1"],
+ cflags: ["-DBINDER_IPC_32BIT=1",],
},
},
@@ -76,4 +78,22 @@ cc_library {
},
}
-subdirs = ["tests"]
+cc_test {
+ name: "binderThroughputTest",
+ srcs: ["tests/binderThroughputTest.cpp"],
+ shared_libs: [
+ "libbinder",
+ "libutils",
+ ],
+ clang: true,
+ cflags: [
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-compare",
+ "-O3",
+ CFLAGS_FOR_BENCH_SUITE
+ ],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+}
+
cflags: ["-DBINDER_IPC_32BIT=1"],
diff --git a/libs/binder/Android.bp b/libs/binder/Android.bp
index f7347aef1..a539fac47 100644
index 57c87756e..0f34bcff7 100644
--- a/libs/binder/Android.bp
+++ b/libs/binder/Android.bp
@@ -52,10 +52,12 @@ cc_library {
@@ -80,7 +80,9 @@ cc_library {
"-Wall",
"-Wextra",
"-Werror",
......@@ -11,8 +11,4 @@ index f7347aef1..a539fac47 100644
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
product_variables: {
binder32bit: {
- cflags: ["-DBINDER_IPC_32BIT=1"],
+ cflags: ["-DBINDER_IPC_32BIT=1",],
},
},
cflags: ["-DBINDER_IPC_32BIT=1"],
diff --git a/compiler/Android.bp b/compiler/Android.bp
index 1e4cdf2bd..e14dce8d7 100644
index 2e60e7d658..51f20a86ef 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -197,6 +197,9 @@ art_cc_defaults {
"art_cmdlineparser_headers", // For compiler_options.
@@ -195,6 +195,9 @@ art_cc_defaults {
],
export_include_dirs: ["."],
+
+ cflags: [CFLAGS_FOR_BENCH_SUITE],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
export_include_dirs: ["."],
}
gensrcs {
diff --git a/compiler/Android.bp b/compiler/Android.bp
index fe0f3c75c5..d0430bcd55 100644
index 2e60e7d658..51f20a86ef 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -199,6 +199,9 @@ art_cc_defaults {
@@ -195,6 +195,9 @@ art_cc_defaults {
],
export_include_dirs: ["."],
......
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index ae4eabf94d0..b7f758f1ca5 100644
index 24d819e93ff2..bdb1bee13bde 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -33,8 +33,11 @@ cc_defaults {
@@ -31,7 +31,9 @@ cc_defaults {
// TODO: Linear blending should be enabled by default, but we are
// TODO: making it an opt-in while it's a work in progress
//"-DANDROID_ENABLE_LINEAR_BLENDING",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
include_dirs: [
"external/skia/include/private",
"external/skia/src/core",
@@ -236,6 +239,9 @@ cc_defaults {
export_proto_headers: true,
},
+ cflags: [CFLAGS_FOR_BENCH_SUITE],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
export_include_dirs: ["."],
export_shared_lib_headers: ["libRScpp"],
}
@@ -350,6 +356,9 @@ cc_benchmark {
whole_static_libs: ["libhwui"],
shared_libs: ["libmemunreachable"],
+ cflags: [CFLAGS_FOR_BENCH_SUITE],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
srcs: [
"tests/macrobench/TestSceneRunner.cpp",
"tests/macrobench/main.cpp",
@@ -367,8 +376,11 @@ cc_benchmark {
cflags: [
"-include debug/wrap_gles.h",
"-DHWUI_NULL_GPU",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
whole_static_libs: ["libhwui_static_debug"],
shared_libs: ["libmemunreachable"],
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index ae4eabf94d0..23c95465221 100644
index 24d819e93ff2..bdb1bee13bde 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -33,8 +33,11 @@ cc_defaults {
@@ -31,7 +31,9 @@ cc_defaults {
// TODO: Linear blending should be enabled by default, but we are
// TODO: making it an opt-in while it's a work in progress
//"-DANDROID_ENABLE_LINEAR_BLENDING",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
include_dirs: [
"external/skia/include/private",
"external/skia/src/core",
@@ -236,6 +239,9 @@ cc_defaults {
export_proto_headers: true,
},
+ cflags: [CFLAGS_FOR_BENCH_SUITE],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
export_include_dirs: ["."],
export_shared_lib_headers: ["libRScpp"],
}
@@ -350,6 +356,9 @@ cc_benchmark {
whole_static_libs: ["libhwui"],
shared_libs: ["libmemunreachable"],
+ cflags: [CFLAGS_FOR_BENCH_SUITE],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
srcs: [
"tests/macrobench/TestSceneRunner.cpp",
"tests/macrobench/main.cpp",
@@ -367,8 +376,11 @@ cc_benchmark {
cflags: [
"-include debug/wrap_gles.h",
"-DHWUI_NULL_GPU",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
whole_static_libs: ["libhwui_static_debug"],
shared_libs: ["libmemunreachable"],
diff --git a/Android.bp b/Android.bp
index d259f8f13e..b87fccc7b6 100644
index 7676cd3ef0..dc4e9c8115 100644
--- a/Android.bp
+++ b/Android.bp
@@ -9,8 +9,11 @@ cc_library {
@@ -10,8 +10,11 @@ cc_library {
"-D_FORTIFY_SOURCE=1",
"-DSKIA_IMPLEMENTATION=1",
"-DATRACE_TAG=ATRACE_TAG_VIEW",
......@@ -14,27 +14,23 @@ index d259f8f13e..b87fccc7b6 100644
export_include_dirs: [
"include/android/",
"include/c/",
@@ -845,8 +848,11 @@ cc_test {
@@ -861,7 +864,9 @@ cc_test {
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-variable",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags:[LDFLAGS_FOR_BENCH_SUITE],
+
local_include_dirs: [
"experimental/svg/model/",
"gm/",
@@ -1602,8 +1608,11 @@ cc_test {
@@ -1640,7 +1645,9 @@ cc_test {
cflags: [
"-Wno-unused-parameter",
"-Wno-unused-variable",
+ CFLAGS_FOR_BENCH_SUITE
],
+ ldflags:[LDFLAGS_FOR_BENCH_SUITE],
+
local_include_dirs: [
"bench/",
"experimental/svg/model/",
# TO CLARIFY:
# This patch will remove the attempt to copy resources to device,
# because there is a bug (http://b/71906438) forbiding copying subdirectory.
# Since we are using mma to build and copy resources manually to device,
# at this moment we remove this part to work around with the bug.
diff --git a/Android.bp b/Android.bp
index b721f34c50..06942d7e16 100644
index 9b7dd9b4a2..3bf20bd38c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -58,8 +58,11 @@ cc_library_static {
......@@ -14,7 +20,7 @@ index b721f34c50..06942d7e16 100644
cppflags:[
"-Wno-abstract-vbase-init",
"-Wno-c++98-compat",
@@ -940,6 +943,9 @@ cc_test {
@@ -985,6 +988,9 @@ cc_test {
"skia_tool_deps"
],
......@@ -22,9 +28,9 @@ index b721f34c50..06942d7e16 100644
+ ldflags: [LDFLAGS_FOR_BENCH_SUITE],
+
local_include_dirs: [
"experimental/svg/model/",
"gm/",
@@ -1701,6 +1707,9 @@ cc_test {
"experimental/skottie/",
"experimental/sksg/",
@@ -1803,6 +1809,9 @@ cc_test {
"skia_tool_deps"
],
......@@ -33,4 +39,13 @@ index b721f34c50..06942d7e16 100644
+
local_include_dirs: [
"bench/",
"experimental/svg/model/",
"experimental/sksg/",
@@ -2388,8 +2397,4 @@ cc_test {
"tools/trace/SkDebugfTracer.cpp",
"tools/trace/SkEventTracingPriv.cpp",
],
-
- data: [
- "resources/*",
- ],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment