src/tests/restricted_traces/gen_restricted_traces.py


Log

Author Commit Date CI Message
Jamie Madill 4d893a93 2021-09-07T11:47:23 Re-land: "Trace Tests: Remove auto-generated code." No significant changes in the re-land. Bug: angleproject:5133 Change-Id: Ib5bb8fba3e9e2f1f648d5af251b7b2319c9f37dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3352432 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop 709d8727 2021-12-14T16:11:33 Revert "Trace Tests: Remove auto-generated code." This reverts commit 1c0bb44862fbc6107d73d056c2e07c59bcfa8d09. Reason for revert: Causing failures on Intel Linux with native driver. Original change's description: > Trace Tests: Remove auto-generated code. > > Bug: angleproject:5133 > Change-Id: I71a82071b1c667475f7fefcd6c8766a9de71141d > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3144215 > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Reviewed-by: Tim Van Patten <timvp@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> Bug: angleproject:6816 Change-Id: Ic35145c8c3bb23ccf196b86def42f4a82f07aad5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3340332 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Jamie Madill 1c0bb448 2021-09-07T11:47:23 Trace Tests: Remove auto-generated code. Bug: angleproject:5133 Change-Id: I71a82071b1c667475f7fefcd6c8766a9de71141d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3144215 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7fc6c07c 2021-09-29T14:02:29 Capture/Replay: Update process for trace upgrading. Includes changes to the retracing script. Also includes documentation on how the process works. Bug: angleproject:5133 Change-Id: I1acfe338f3fe0282a0461c314274c761ed04bd2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3193418 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b930b9d3 2021-09-08T09:08:28 Capture/Replay: Remove redundant "capture" from label old: trex_200_capture_context1_frame001.cpp new: trex_200_context1_frame001.cpp The 'capture' word wasn't really adding any useful information. Take it out so the filenames are a bit shorter. Bug: angleproject:5133 Change-Id: Ibd7d47df2aa1f24a641c5d5b2a6dd14d6ce240e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3149370 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 5650273a 2021-09-07T09:41:59 Capture/Replay: Capture trace file list to JSON. Instead of using a text file, we can use a JSON file to store the list of files in a trace. We can use this list in the GN to pull the trace files directly instead of using auto-generated code. It also consolidates the trace metadata in a single location. Also captures the Windows Surface ID to the JSON file. Bug: angleproject:5133 Change-Id: I236b614f7d0c844e7c4a5276dd6ac5964e5c393d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3144214 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 2f3e4db8 2021-09-02T10:31:13 Capture/Replay: Serialize trace metadata to a JSON file. This will allow us to remove more code auto-generation for the trace tests. The trace info now can be loaded directly from JSON instead of from the autogenerated information. Bug: angleproject:5133 Change-Id: I04e22b9279b19282df274bc8defcd363d0449111 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140218 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 9874be31 2021-09-02T10:25:21 Trace Tests: Load trace list from JSON file. Instead of using the auto-generated enum for the trace list, load directly from restricted_traces.json. This will lead to more CLs that entirely remove the auto-generated code from the trace tests. Bug: angleproject:5133 Change-Id: I6515624a2145319d097b43085741cf9c48f1792e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3140217 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b8c50f39 2021-08-25T09:05:03 Support syncing traces to experimental CIPD prefix. This lets us test a retrace without first committing it to the immutable "angle" prefix. Bug: angleproject:5133 Change-Id: Ia52ccffe69faf099d6fc92eaf392610eefa549f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3118270 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 259ae49c 2021-08-20T10:51:31 Capture/Replay: Isolate trace export definitions. This small fix to the export header means we no longer include the "restricted_traces_autogen.h" in each and every trace file. That means when we change/add/remove a trace we no longer need to recompile each and every trace. Speeds up iteration time when working with the traces. Also fixes inconsistent path generation on Windows. Bug: angleproject:5133 Change-Id: I357d65477a683455d01379379e2e98431af2ed55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3110749 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten fa74421d 2021-08-06T18:30:57 Capture/Replay: Add LoadEGL() Add LoadEGL() to gen_restricted_traces.py. This is a pre-requisite to frame capture being able to generate EGL calls, which is required for multi-context support. Bug: angleproject:5878 Change-Id: I210035aecad42173626834588bae51019deaa076 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078994 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 06b19ed8 2021-08-06T17:02:36 Framecapture: Update file naming Update the file naming to add "shared" and remove the unnecessary frame numbering: angle.angledata.gz angle_capture_context1.cpp angle_capture_context1.h angle_capture_context1_files.txt angle_capture_context1_frame001.cpp angle_capture_shared.cpp angle_capture_shared.h Bug: angleproject:6256 Change-Id: I6454a3dc412896557f29faee1269dfa55146d43b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078908 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Lubosz Sarnecki 747d5323 2021-07-27T13:30:59 gen_restricted_traces: Add kReplayDrawSurfaceColorSpace. Use default color space if the trace doesn't specify one. Use Python 3.6 f-strings for the possibility to have default values at all positions and remove the now redundant defaults string. This breaks Python 2 compatibility for gen_restricted_traces.py. See PEP 498: https://www.python.org/dev/peps/pep-0498/ Bug: angleproject:5857 Change-Id: I532014e8e64ea792604a96a42ad998564882d801 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3056372 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 223cd0ac 2021-06-15T18:46:07 Capture/Replay: Refactor shared context handling This is the initial CL to enable capture/replay of multi-context applications. This CL refactors FrameCapture and FrameCaptureShared to move much of the functionality into FrameCaptureShared, since most everything is shared by Contexts in the share group. For example, the setup of the majority of the GL objects is done in the new SetupReplayContextShared() function in the new $LABEL_capture_context_shared_frame001.cpp file. The setup is performed by (for example): void SetupReplay() { $LABEL::InitReplay(); $LABEL::SetupReplayContextShared(); SetupReplayContext2(); } This performs the shared setup first, followed by the context-specific setup, which may reference shared objects careated by LABEL::SetupReplayContextShared(). No re-capturing is required with this change, since the external APIs (i.e., SetupReplay()) are still the same. Bug: angleproject:5878 Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2 Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 14f8918c 2021-04-16T09:17:29 Migrate more scripts to python3 Test: python3 scripts/run_code_generation.py Bug: angleproject:5707 Change-Id: I5abae69c1c6bf03cc418f10beaabc80288fa1c94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2828979 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill bf6e074f 2021-04-13T13:23:26 Add gclient variable to checkout traces. 'checkout_angle_restricted_traces' controls if we should check out the trace tests. We can give restricted access to partners for these traces. Defaults to the same setting as 'checkout_angle_internal'. Bug: angleproject:5860 Change-Id: I36efffb180b35e11e104e2c99bc89fb4be4e0708 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822232 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 78dde332 2021-03-29T17:31:52 Move restricted traces to CIPD. All traces are now stored as DEPS entries in CIPD. The auto-generation script generates the DEPS entries. Note that we don't include DEPS in the list of generated outputs to simplify other rollers. Also we update auto-generation to include full sources list to allow 'gn analyze' to work successfully. Usees a trace fixture for common code. This will enable a more compact trace without as much repeated code. We must land a set of re-trace traces to avoid breakage. Also includes a python script for uploading new traces to CIPD. The script first checks if traces are already present in the cloud, and if so it skips the upload. It will take a while to complete as the number of traces grows larger as it takes a few seconds per trace. The traces in this patch are also re-traced to use the common fixture code instead of including duplicated code in each trace. They now form a simple common interface and the autogenerated cpp is now simply a list of properties. I've also updated the capture/replay tests to use the simpler common entry point integration. There is less auto-generated glue code now. We now use a new serialized string query extension instead of calling directly into ANGLE's internals. Also includes a docs update. The capture/replay sample is broken and we'll need to update it in a follow-up CL. Also includes a few necessary fixes to the retracing script. Bug: angleproject:5811 Change-Id: I977bc6dc56843c8966377fc445ae97e91e17319a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2797833 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Cody Northrop 88b91df1 2021-03-29T23:01:01 Capture/Replay: Support multi-digit context The code is designed for single digit contexts, i.e 1-9. We've hit our first app that uses context 10, so update the logic. Bug: b/184105957 Bug: angleproject:5807 Change-Id: Ice5facad8a86f009c0a85d184db4a20e48eff248 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2796402 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cody Northrop 3e017cfe 2021-02-26T15:37:41 Tests: Use context version from trace Test: Capture and replay ES 3.2 apps Bug: angleproject:5652 Change-Id: Ib46250acd8a50390f0cbd40853623cdf31bd0203 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2698392 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 98035e11 2020-11-09T17:55:39 Capture/Replay: Split into separate shared libaries. This will produce several smaller shared libs rather than one very large one. Involves moving the trace loader to its own shared module as well. Because the traces didn't have export labels on most of the affected functions I had to use a "force include" argument on the compiler. We can remove this once we re-capture. This is a first step towards testing one trace at a time on an Android device. Includes a complete set of new regenerated traces. Bug: angleproject:5133 Change-Id: If984de34af21fce48b0832401dbe5aa4b002ce95 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506199 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill 77defeb0 2020-10-27T18:31:53 Add the ability to re-trace existing traces. This new script runs the ANGLE trace tests with capture enabled to generate updated replay cpp files. This allows us to update our traces files to a new file format in one step. Trace metadata (currently only the default FBO format) is preserved between re-traces. Currently only desktop-based retracing is supported. This means a couple traces that require specific extensions don't run on all platforms. Bug: angleproject:5134 Change-Id: I7c923d89e33c18285ab36a7cee91f2fb735758eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488130 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill b6c17996 2020-09-23T13:37:48 Auto-generate restricted trace .gitignore. I'm going to add a non-ignored subdirectory so it behooves us to fix our blanket suppression. This will also allow users to clean up stale trace files. Bug: angleproject:4090 Bug: b/168049670 Change-Id: I5b0879eb3eebf3b352bb78e3b927203f9483c89f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426885 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill bda2205d 2020-09-17T14:37:25 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: Cody Northrop <cnorthrop@google.com>