~mmach/netext73/webkit2gtk

« back to all changes in this revision

Viewing changes to Source/ThirdParty/ANGLE/src/tests/perf_tests/restricted_traces/RestrictedTraceTests.md

  • Committer: mmach
  • Date: 2023-06-16 17:21:37 UTC
  • Revision ID: netbit73@gmail.com-20230616172137-2rqx6yr96ga9g3kp
1

Show diffs side-by-side

added added

removed removed

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