src/tests/restricted_traces/retrace_restricted_traces.py


Log

Author Commit Date CI Message
Lubosz Sarnecki b3fff1aa 2022-03-31T16:03:11 retrace_restricted_traces: Check for json file. Validate trace upgrades by looking for existing json file instead context header, which was incorrect when traces did not contain a context == 1. Introduce get_trace_json_path function. Use python fstrings. Bug: angleproject:7107 Change-Id: Ib83acb646fb2d9c38d8ca99766170e6c9c7eeb06 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3571884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Lubosz Sarnecki e933df51 2022-03-31T15:12:43 retrace_restricted_traces: Remove unused code. Remove unused load_json_metadata, get_trace_metadata and replace_metadata functions. Remove unused re import and trace_path parameter from get_context. Bug: angleproject:7107 Change-Id: I203609ca45145cdced8295d5edf7faa0c8606ae6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3571883 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
Jamie Madill 9aca4285 2021-12-30T09:18:32 Traces: Fix path in retrace script. This was accidentally regressed when removing the auto-generation. Bug: angleproject:5133 Change-Id: I44e88bd15c9baaca66c49b1e379b2e0dd7206b3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3362295 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@google.com> Commit-Queue: Jamie Madill <jmadill@google.com>
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 c5a38976 2021-09-01T07:35:40 Capture/Replay: Add expression trigger validation calls. Setting the environment variable "ANGLE_CAPTURE_VALIDATION_EXPR" will make ANGLE's capture logic evaluate this expression every captured call to see if it should insert a validation checkpoint. The retracing script also accepts --validation-expr as an argument. For instance, the expression: ((frame == 2) && (call < 1189) && (call > 1100) && ((call % 5) == 0)) Will insert validation checkpoints on frame 2, between calls 1100 and 1189 and will validate every 5th call. The 'call' here is the count of captured calls, which are mostly GL calls with a few ANGLE replay calls in the mix. We add a small single-header library that can evaluate arthithmetic expressions in order to parse these expressions, as well as an option to the retracing script. Bug: angleproject:5133 Change-Id: Ic369e85d8e905a3a7a32fa098f7d8ebe7baf4ab9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3136094 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 9c05f55a 2021-07-15T10:58:10 Capture/Replay: Add replay state validation. We can use this to validate traces that have slight differences when retracing. The valdation works by embedding the "expected" JSON into a string at the end of each captured frame. The replay also embeds a callback which fires right before the swap in the replay harness. The harness then gets the "actual" JSON and runs a comparison. On a mismatch it calls "diff" externally. Currently the diff call is hard-coded to work on Linux only. Note that when running validation it's important to replay on SwiftShader since that's what we use to retrace. Bug: angleproject:5133 Change-Id: Icbf0031d07be8bd916607c537dec235f9a512c43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066008 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 839d5318 2021-08-16T08:29:28 Capture/Replay: Changes to MEC first frame capture. Recent changes made it so it was impossible to trigger MEC *after* the first frame and *before* the second frame. Instead it was only possible to capture *before* the first frame or *after* the second frame. Makes it possible for the retracing script to do identical captures. Also includes a number of refactorings to make it simpler to follow the code, including renaming methods, and removing some extra output files. Bug: angleproject:5133 Change-Id: Ice6a189eb9f4d53e8ee1ba39beb537af2ef5fd9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3097807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 3a6e22d5 2021-07-09T12:09:53 Trace Tests: Update retracing script. Adds an option to skip retracing traces that already exist. That makes the script much easier to use on folders that already have traces partially retraced. It also catches exceptions when running the traces so that ANGLE crashes and ASSERTions don't need you to restart the retrace. Bug: angleproject:5133 Change-Id: I059ca545145eadc1aa8c373a2fde762bbeb52b55 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018302 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@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>
Jamie Madill 3fe652d0 2020-10-29T08:54:57 Add option to disable SwiftShader when retracing. Bug: angleproject:5133 Change-Id: I589252d7eb9648a37a98f896c2a14462b2b34c48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2506492 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@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>