• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ANGLE Restricted Traces
2
3The files in this directory are traces of real applications.  We host them
4internally because they may contain third party IP which we don't want
5to share publicly.
6
7## Setup
8
9In order to compile and run with these, you must be granted access by Google,
10then authenticate with the cloud with your @google account:
11```
12gcloud auth login
13```
14```
15download_from_google_storage --config
16<enter 0 for the project ID>
17```
18Add the following to ANGLE's .gclient file:
19```
20    "custom_vars": {
21      "checkout_angle_internal":"True"
22    },
23```
24Then use gclient to pull down binary files from a cloud storage bucket.
25```
26gclient runhooks
27```
28To build the tests, add the following GN argument:
29```
30build_angle_trace_perf_tests = true
31```
32Build the angle_perftests:
33```
34autoninja -C out/Release angle_perftests
35```
36Run them like so:
37```
38out/Release/angle_perftests --gtest_filter=TracePerfTest*
39```
40
41## Updating traces
42
43The Manhattan and TRex traces were captured on Windows with an Intel driver (due to better compressed texture support).
44
45Update START and END for each range.
46
47### Windows
48
49```
50cd gfxbench\out\install\vs2017-x64\lib
51python ..\..\..\..\scripts\refresh_angle_libs.py --verbose
52set TFW_PACKAGE_DIR=../../../build/vs2017-x64/testfw/tfw-dev
53set ANGLE_DEFAULT_PLATFORM=vulkan
54
55# TRex
56set START=200
57set END=210
58set LABEL=trex
59mkdir ..\..\..\..\..\angle\src\tests\perf_tests\restricted_traces\%LABEL%_%START%
60set ANGLE_CAPTURE_LABEL=%LABEL%_%START%
61set ANGLE_CAPTURE_FRAME_START=%START%
62set ANGLE_CAPTURE_FRAME_END=%END%
63set ANGLE_CAPTURE_OUT_DIR=..\..\..\..\..\angle\src\tests\perf_tests\restricted_traces\%LABEL%_%START%
64..\bin\testfw_app.exe -b ../../../build/vs2017-x64/testfw/tfw-dev --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
65
66# Manhattan
67set START=10
68set END=20
69set LABEL=manhattan
70mkdir ..\..\..\..\..\angle\src\tests\perf_tests\restricted_traces\%LABEL%_%START%
71set ANGLE_CAPTURE_LABEL=%LABEL%_%START%
72set ANGLE_CAPTURE_FRAME_START=%START%
73set ANGLE_CAPTURE_FRAME_END=%END%
74set ANGLE_CAPTURE_OUT_DIR=..\..\..\..\..\angle\src\tests\perf_tests\restricted_traces\%LABEL%_%START%
75..\bin\testfw_app.exe -b ../../../build/vs2017-x64/testfw/tfw-dev --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
76```
77
78### Linux
79
80```
81cd gfxbench/out/install/linux/lib
82python ../../../../scripts/refresh_angle_libs.py --verbose
83export PLATFORM=linux
84export TFW_PACKAGE_DIR=../../../build/linux/testfw_Release/tfw-dev
85export ANGLE_DEFAULT_PLATFORM=vulkan
86export LD_LIBRARY_PATH=.
87
88# TRex
89export START=200
90export END=210
91export LABEL=trex
92mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}
93export ANGLE_CAPTURE_LABEL=${LABEL}_${START}
94export ANGLE_CAPTURE_FRAME_START=$START
95export ANGLE_CAPTURE_FRAME_END=$END
96export ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}
97../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_trex --ei -frame_step_time=40
98
99# Manhattan
100export START=10
101export END=20
102export LABEL=manhattan
103mkdir -p ../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}
104export ANGLE_CAPTURE_LABEL=${LABEL}_${START}
105export ANGLE_CAPTURE_FRAME_START=$START
106export ANGLE_CAPTURE_FRAME_END=$END
107export ANGLE_CAPTURE_OUT_DIR=../../../../../angle/src/tests/perf_tests/restricted_traces/${LABEL}_${START}
108../bin/testfw_app -b $TFW_PACKAGE_DIR --gfx egl -w 1920 -h 1080 -t gl_manhattan --ei -frame_step_time=40
109```
110
111## Upload to the cloud
112
113```
114cd ~/chromium/src/third_party/angle/src/tests/perf_tests/restricted_traces
115upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive trex_200
116upload_to_google_storage.py --bucket chrome-angle-capture-binaries --archive manhattan_10
117```
118
119## Adding new tests
120Once you are able to capture a set of frames from an application using the steps above, you'll need to:
121
122* Add the tests to restricted_traces/angle_trace_perf_tests.gni
123* Update TracePerfTest.cpp to include the headers from the test, add it to the list of TracePerfTestID, and support it throughout the file using the namespace created in the trace.
124* Upload the traces to the cloud using the steps above.
125* Add the sha1 files created by the upload and submit them with your changes.
126