Commit bda2205d by Jamie Madill Committed by Commit Bot

Traces: Move up from tests/perf_tests/ to tests/.

The trace tests aren't strictly for performance. Since we'll be using them for correctenss testing as well it makes sense to move them out of the perf_tests/ folder. Also renames RestrictedTraceTests.md to README.md so it'll load automatically in gitiles. Bug: angleproject:4090 Bug: b/168049670 Change-Id: I8be9f1d831489a9abf534d049a93441687850142 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2416913 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 5bfca93e
...@@ -498,8 +498,8 @@ hooks = [ ...@@ -498,8 +498,8 @@ hooks = [
'pattern': '\\.sha1', 'pattern': '\\.sha1',
'condition': 'checkout_angle_internal', 'condition': 'checkout_angle_internal',
'action': [ 'python', 'action': [ 'python',
'src/tests/perf_tests/restricted_traces/download_restricted_traces.py', 'src/tests/restricted_traces/download_restricted_traces.py',
'src/tests/perf_tests/restricted_traces', 'src/tests/restricted_traces',
] ]
} }
] ]
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"087d6a3996a91fbb0b664cac57c50c4c", "087d6a3996a91fbb0b664cac57c50c4c",
"scripts/generate_loader.py": "scripts/generate_loader.py":
"92c731390cf5c0305ea57a3661a01240", "5533a717e679c558be6985a5cb016ad2",
"scripts/gl.xml": "scripts/gl.xml":
"e74a595068cbdd6064300be1e71b7cc9", "e74a595068cbdd6064300be1e71b7cc9",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
"419041385faafafc4299cd6b5b8da642", "419041385faafafc4299cd6b5b8da642",
"src/libEGL/egl_loader_autogen.h": "src/libEGL/egl_loader_autogen.h":
"01035f491f6692446c882504c3d20792", "01035f491f6692446c882504c3d20792",
"src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.cpp": "src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
"929f135ba9ba7717e76552c9e76f0f2f", "929f135ba9ba7717e76552c9e76f0f2f",
"src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.h": "src/tests/restricted_traces/trace_egl_loader_autogen.h":
"af2eb06cc8de3456b7bfde497b04c0c4", "af2eb06cc8de3456b7bfde497b04c0c4",
"src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.cpp": "src/tests/restricted_traces/trace_gles_loader_autogen.cpp":
"f989f0d3e94d1ae985cfc9514cea8d48", "f989f0d3e94d1ae985cfc9514cea8d48",
"src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.h": "src/tests/restricted_traces/trace_gles_loader_autogen.h":
"90da6d113a8248e148bf3a3853192292", "90da6d113a8248e148bf3a3853192292",
"util/egl_loader_autogen.cpp": "util/egl_loader_autogen.cpp":
"e10da66fdf789e6c52dee1f9e1cd5a68", "e10da66fdf789e6c52dee1f9e1cd5a68",
......
{ {
"src/tests/perf_tests/restricted_traces/angry_birds_2_1500.tar.gz.sha1": "src/tests/restricted_traces/angry_birds_2_1500.tar.gz.sha1":
"44fc5437c4a84012e338b3da4b6fc28a", "44fc5437c4a84012e338b3da4b6fc28a",
"src/tests/perf_tests/restricted_traces/candy_crush_500.tar.gz.sha1": "src/tests/restricted_traces/candy_crush_500.tar.gz.sha1":
"ef00d8872fe818250df07f761d440bfb", "ef00d8872fe818250df07f761d440bfb",
"src/tests/perf_tests/restricted_traces/cod_mobile.tar.gz.sha1": "src/tests/restricted_traces/cod_mobile.tar.gz.sha1":
"dffd3bed0d0e53481f43b414309bf152", "dffd3bed0d0e53481f43b414309bf152",
"src/tests/perf_tests/restricted_traces/egypt_1500.tar.gz.sha1": "src/tests/restricted_traces/egypt_1500.tar.gz.sha1":
"1d80caa37b937f83c95cd053b1bdd4ac", "1d80caa37b937f83c95cd053b1bdd4ac",
"src/tests/perf_tests/restricted_traces/gen_restricted_traces.py": "src/tests/restricted_traces/gen_restricted_traces.py":
"79d6e6bcdcea1bf7236091183d34dd9e", "321e6bb9078501db78299c54980f96ac",
"src/tests/perf_tests/restricted_traces/manhattan_10.tar.gz.sha1": "src/tests/restricted_traces/manhattan_10.tar.gz.sha1":
"752781119592a190cc02b773adf38fc3", "752781119592a190cc02b773adf38fc3",
"src/tests/perf_tests/restricted_traces/mobile_legends.tar.gz.sha1": "src/tests/restricted_traces/mobile_legends.tar.gz.sha1":
"a3fe48a3acc2165a7fb3eb6cf01b441f", "a3fe48a3acc2165a7fb3eb6cf01b441f",
"src/tests/perf_tests/restricted_traces/nba2k20_800.tar.gz.sha1": "src/tests/restricted_traces/nba2k20_800.tar.gz.sha1":
"03df0dcf41c18bc59edfc0b088ca4a87", "03df0dcf41c18bc59edfc0b088ca4a87",
"src/tests/perf_tests/restricted_traces/restricted_traces.json": "src/tests/restricted_traces/restricted_traces.json":
"60be7da4acc21fd21e715f941fe9ba78", "60be7da4acc21fd21e715f941fe9ba78",
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.cpp": "src/tests/restricted_traces/restricted_traces_autogen.cpp":
"a82eccc731512d0db843799b0190dd72", "a82eccc731512d0db843799b0190dd72",
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.gni": "src/tests/restricted_traces/restricted_traces_autogen.gni":
"58f17776b329492ba094e809cffbcf2a", "58f17776b329492ba094e809cffbcf2a",
"src/tests/perf_tests/restricted_traces/restricted_traces_autogen.h": "src/tests/restricted_traces/restricted_traces_autogen.h":
"cf1a5ee60842ea8367225facc10c1ae3", "cf1a5ee60842ea8367225facc10c1ae3",
"src/tests/perf_tests/restricted_traces/subway_surfer_500.tar.gz.sha1": "src/tests/restricted_traces/subway_surfer_500.tar.gz.sha1":
"a47a797dd227f5025439b47cee80dbc9", "a47a797dd227f5025439b47cee80dbc9",
"src/tests/perf_tests/restricted_traces/temple_run_300.tar.gz.sha1": "src/tests/restricted_traces/temple_run_300.tar.gz.sha1":
"e912c0a0e93efe73088211d63b4a30af", "e912c0a0e93efe73088211d63b4a30af",
"src/tests/perf_tests/restricted_traces/trex_200.tar.gz.sha1": "src/tests/restricted_traces/trex_200.tar.gz.sha1":
"ca2d91a527f4a4317f944afc96c35268" "ca2d91a527f4a4317f944afc96c35268"
} }
\ No newline at end of file
...@@ -227,7 +227,7 @@ def gen_util_gles_and_egl_loaders(): ...@@ -227,7 +227,7 @@ def gen_util_gles_and_egl_loaders():
def gen_trace_gles_and_egl_loaders(): def gen_trace_gles_and_egl_loaders():
path = os.path.join("..", "src", "tests", "perf_tests", "restricted_traces") path = os.path.join("..", "src", "tests", "restricted_traces")
export = "ANGLE_TRACE_EXPORT " export = "ANGLE_TRACE_EXPORT "
lib = "ANGLE_RESTRICTED_TRACES" lib = "ANGLE_RESTRICTED_TRACES"
gen_gles_loader(trace_gles_preamble, path, lib, export, "t_", "trace_") gen_gles_loader(trace_gles_preamble, path, lib, export, "t_", "trace_")
...@@ -283,10 +283,10 @@ def main(): ...@@ -283,10 +283,10 @@ def main():
'../util/gles_loader_autogen.h', '../util/gles_loader_autogen.h',
'../util/windows/wgl_loader_autogen.cpp', '../util/windows/wgl_loader_autogen.cpp',
'../util/windows/wgl_loader_autogen.h', '../util/windows/wgl_loader_autogen.h',
'../src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.cpp', '../src/tests/restricted_traces/trace_egl_loader_autogen.cpp',
'../src/tests/perf_tests/restricted_traces/trace_egl_loader_autogen.h', '../src/tests/restricted_traces/trace_egl_loader_autogen.h',
'../src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.cpp', '../src/tests/restricted_traces/trace_gles_loader_autogen.cpp',
'../src/tests/perf_tests/restricted_traces/trace_gles_loader_autogen.h', '../src/tests/restricted_traces/trace_gles_loader_autogen.h',
] ]
if sys.argv[1] == 'inputs': if sys.argv[1] == 'inputs':
......
...@@ -114,7 +114,7 @@ generators = { ...@@ -114,7 +114,7 @@ generators = {
'proc table': 'proc table':
'scripts/gen_proc_table.py', 'scripts/gen_proc_table.py',
'restricted traces': 'restricted traces':
'src/tests/perf_tests/restricted_traces/gen_restricted_traces.py', 'src/tests/restricted_traces/gen_restricted_traces.py',
'Static builtins': 'Static builtins':
'src/compiler/translator/gen_builtin_symbols.py', 'src/compiler/translator/gen_builtin_symbols.py',
'uniform type': 'uniform type':
......
...@@ -12,6 +12,8 @@ declare_args() { ...@@ -12,6 +12,8 @@ declare_args() {
build_angle_deqp_tests = false build_angle_deqp_tests = false
build_angle_gles1_conform_tests = false build_angle_gles1_conform_tests = false
build_angle_trace_perf_tests = false build_angle_trace_perf_tests = false
build_angle_perftests =
is_win || is_linux || is_chromeos || is_android || is_mac || is_fuchsia
} }
angle_test("test_utils_unittest_helper") { angle_test("test_utils_unittest_helper") {
...@@ -283,89 +285,26 @@ if (is_win || is_linux || is_chromeos || is_android || is_mac) { ...@@ -283,89 +285,26 @@ if (is_win || is_linux || is_chromeos || is_android || is_mac) {
} }
} }
if (is_win || is_linux || is_chromeos || is_android || is_mac || is_fuchsia) { if (build_angle_perftests) {
import("angle_perftests.gni") import("angle_perftests.gni")
if (build_angle_trace_perf_tests) {
angle_shared_library("angle_restricted_traces") {
testonly = true
# Imports "angle_restricted_traces"
import("perf_tests/restricted_traces/restricted_traces_autogen.gni")
sources = [
"perf_tests/restricted_traces/angle_trace_gl.h",
"perf_tests/restricted_traces/restricted_traces_autogen.cpp",
"perf_tests/restricted_traces/restricted_traces_autogen.h",
"perf_tests/restricted_traces/trace_egl_loader_autogen.cpp",
"perf_tests/restricted_traces/trace_egl_loader_autogen.h",
"perf_tests/restricted_traces/trace_gles_loader_autogen.cpp",
"perf_tests/restricted_traces/trace_gles_loader_autogen.h",
]
data = []
defines = [ "ANGLE_TRACE_IMPLEMENTATION" ]
include_dirs = [ "perf_tests/restricted_traces" ]
foreach(_test_info, angle_restricted_traces) {
_test_and_ctx = []
_test_and_ctx = string_split(_test_info)
_test = _test_and_ctx[0]
_ctx = _test_and_ctx[1]
_test_dir = "perf_tests/restricted_traces/${_test}"
_test_ctx = "${_test_dir}/${_test}_capture_context${_ctx}"
# Similar to capture replay sample, use the file index for sources
sources +=
rebase_path(read_file("${_test_ctx}_files.txt", "list lines"),
".",
"${_test_dir}") +
[
"${_test_ctx}.cpp",
"${_test_ctx}.h",
]
data += [ "${_test_dir}/${_test}_capture_context${_ctx}.angledata.gz" ]
}
deps = [
"$angle_root:angle_common",
"$angle_root/util:angle_util",
]
suppressed_configs +=
[ "$angle_root:constructor_and_destructor_warnings" ]
# Disable optimization in the trace perf tests to avoid optimizing huge files.
if (!is_debug) {
suppressed_configs += [
"//build/config/compiler:afdo",
"//build/config/compiler:afdo_optimize_size",
"//build/config/compiler:default_optimization",
"//build/config/compiler/pgo:default_pgo_flags",
]
configs += [ "//build/config/compiler:no_optimize" ]
}
}
}
angle_source_set("angle_trace_perftests") { angle_source_set("angle_trace_perftests") {
testonly = true testonly = true
if (build_angle_trace_perf_tests) { if (build_angle_trace_perf_tests) {
sources = [ "perf_tests/TracePerfTest.cpp" ] sources = [ "perf_tests/TracePerfTest.cpp" ]
if (is_android) { if (is_android) {
_trace_data_path = "/sdcard/chromium_tests_root/third_party/angle/src/tests/perf_tests/restricted_traces" _trace_data_path = "/sdcard/chromium_tests_root/third_party/angle/src/tests/restricted_traces"
} else { } else {
_trace_data_path = _trace_data_path = rebase_path("restricted_traces", root_out_dir)
rebase_path("perf_tests/restricted_traces", root_out_dir)
} }
defines = [ "ANGLE_TRACE_DATA_DIR=\"${_trace_data_path}\"" ] defines = [ "ANGLE_TRACE_DATA_DIR=\"${_trace_data_path}\"" ]
deps = [ deps = [
":angle_perftests_shared", ":angle_perftests_shared",
":angle_restricted_traces",
"$angle_root:angle_compression", "$angle_root:angle_compression",
"$angle_root/util:angle_png_utils", "$angle_root/util:angle_png_utils",
"restricted_traces:angle_restricted_traces",
] ]
suppressed_configs += suppressed_configs +=
[ "$angle_root:constructor_and_destructor_warnings" ] [ "$angle_root:constructor_and_destructor_warnings" ]
......
...@@ -40,6 +40,6 @@ ANGLE implements a no-op driver for OpenGL, D3D11 and Vulkan. To run on these co ...@@ -40,6 +40,6 @@ ANGLE implements a no-op driver for OpenGL, D3D11 and Vulkan. To run on these co
* [`TextureBenchmark`](TexturesPerf.cpp): Tests Texture state change performance. * [`TextureBenchmark`](TexturesPerf.cpp): Tests Texture state change performance.
* [`LinkProgramBenchmark`](LinkProgramPerfTest.cpp): Tests performance of `glLinkProgram`. * [`LinkProgramBenchmark`](LinkProgramPerfTest.cpp): Tests performance of `glLinkProgram`.
* [`glmark2`](glmark2.cpp): Runs the glmark2 benchmark. * [`glmark2`](glmark2.cpp): Runs the glmark2 benchmark.
* [`TracePerfTest`](TracePerfTest.cpp): Runs replays of restricted traces, not available publicly. To enable, read more in [`RestrictedTraceTests`](restricted_traces/RestrictedTraceTests.md) * [`TracePerfTest`](TracePerfTest.cpp): Runs replays of restricted traces, not available publicly. To enable, read more in [`RestrictedTraceTests`](../restricted_traces/README.md)
Many other tests can be found that have documentation in their classes. Many other tests can be found that have documentation in their classes.
# Copyright 2020 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Contains the build rules for confidential trace tests.
import("../../../gni/angle.gni")
angle_shared_library("angle_restricted_traces") {
testonly = true
# Imports "angle_restricted_traces"
import("restricted_traces_autogen.gni")
sources = [
"angle_trace_gl.h",
"restricted_traces_autogen.cpp",
"restricted_traces_autogen.h",
"trace_egl_loader_autogen.cpp",
"trace_egl_loader_autogen.h",
"trace_gles_loader_autogen.cpp",
"trace_gles_loader_autogen.h",
]
data = []
defines = [ "ANGLE_TRACE_IMPLEMENTATION" ]
include_dirs = [ "." ]
foreach(_test_info, angle_restricted_traces) {
_test_and_ctx = []
_test_and_ctx = string_split(_test_info)
_test = _test_and_ctx[0]
_ctx = _test_and_ctx[1]
_test_dir = "${_test}"
_test_ctx = "${_test_dir}/${_test}_capture_context${_ctx}"
# Similar to capture replay sample, use the file index for sources
sources += rebase_path(read_file("${_test_ctx}_files.txt", "list lines"),
".",
"${_test_dir}") +
[
"${_test_ctx}.cpp",
"${_test_ctx}.h",
]
data += [ "${_test_dir}/${_test}_capture_context${_ctx}.angledata.gz" ]
}
deps = [
"$angle_root:angle_common",
"$angle_root/util:angle_util",
]
suppressed_configs += [ "$angle_root:constructor_and_destructor_warnings" ]
# Disable optimization in the trace perf tests to avoid optimizing huge files.
if (!is_debug) {
suppressed_configs += [
"//build/config/compiler:afdo",
"//build/config/compiler:afdo_optimize_size",
"//build/config/compiler:default_optimization",
"//build/config/compiler/pgo:default_pgo_flags",
]
configs += [ "//build/config/compiler:no_optimize" ]
}
}
...@@ -67,16 +67,16 @@ cd out/install/$PLATFORM/lib ...@@ -67,16 +67,16 @@ cd out/install/$PLATFORM/lib
python ../../../../scripts/refresh_angle_libs.py python ../../../../scripts/refresh_angle_libs.py
# TRex # TRex
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/trex_200 mkdir -p ../../../../../angle/src/tests/restricted_traces/trex_200
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/trex_200 ANGLE_CAPTURE_FRAME_START=200 ANGLE_CAPTURE_FRAME_END=210 ANGLE_CAPTURE_LABEL=trex_200 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40 ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/trex_200 ANGLE_CAPTURE_FRAME_START=200 ANGLE_CAPTURE_FRAME_END=210 ANGLE_CAPTURE_LABEL=trex_200 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
# Manhattan # Manhattan
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/manhattan_10 mkdir -p ../../../../../angle/src/tests/restricted_traces/manhattan_10
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/manhattan_10 ANGLE_CAPTURE_FRAME_START=10 ANGLE_CAPTURE_FRAME_END=20 ANGLE_CAPTURE_LABEL=manhattan_10 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40 ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/manhattan_10 ANGLE_CAPTURE_FRAME_START=10 ANGLE_CAPTURE_FRAME_END=20 ANGLE_CAPTURE_LABEL=manhattan_10 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
# Egypt # Egypt
mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/egypt_1500 mkdir -p ../../../../../angle/src/tests/restricted_traces/egypt_1500
ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/egypt_1500 ANGLE_CAPTURE_FRAME_START=1500 ANGLE_CAPTURE_FRAME_END=1510 ANGLE_CAPTURE_LABEL=egypt_1500 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_egypt --ei -frame_step_time=40 ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/restricted_traces/egypt_1500 ANGLE_CAPTURE_FRAME_START=1500 ANGLE_CAPTURE_FRAME_END=1510 ANGLE_CAPTURE_LABEL=egypt_1500 ../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_egypt --ei -frame_step_time=40
``` ```
## Upload to the cloud ## Upload to the cloud
...@@ -84,7 +84,7 @@ ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_trace ...@@ -84,7 +84,7 @@ ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_trace
Starting from you ANGLE root directory: Starting from you ANGLE root directory:
``` ```
cd src/tests/perf_tests/restricted_traces cd src/tests/restricted_traces
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_200 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_200
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_10 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_10
upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive egypt_1500 upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive egypt_1500
......
...@@ -193,6 +193,7 @@ void SetBinaryDataDecompressCallback(RestrictedTraceID traceID, DecompressCallba ...@@ -193,6 +193,7 @@ void SetBinaryDataDecompressCallback(RestrictedTraceID traceID, DecompressCallba
}} // namespace angle }} // namespace angle
""" """
def reject_duplicate_keys(pairs): def reject_duplicate_keys(pairs):
found_keys = {} found_keys = {}
for key, value in pairs: for key, value in pairs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment