util/capture/trace_interpreter.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 52152933 2023-06-06T15:36:36 Add trace_interface: functions and callbacks for traces Defines the interface between the test suite (or an other TraceLibrary class user) and trace libraries. TraceFunctions defines entry points for calls suite->trace, such as SetupReplay() or SetBinaryDataDir(). TraceCallbacks defines entry points for calls trace->suite, for example for loading .angledata.gz files. These are set up via the exported SetupEntryPoints() call. Functions like SetupReplay etc no longer need to be exported from the trace library. TraceInfo (parsed representation of the trace json) is moved to trace_interface as is. This is convenient for further changes to the fixture that will allow to easily move some of the captured parameters to json. This also moves Decompress functionality (and memory ownership) to test suite entirely, which avoids Decompress/Delete callbacks - the trace just calls LoadBinaryData via TraceCallbacks and TraceLibrary releases the memory either on FinishReplay or in its destructor. This should also take care of the memory leak described in https://crrev.com/c/3858185 Bug: b/286072760 Change-Id: Ibc6f6f64156ad805b1917c8fc41a3b0d2c0d6375 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4594445 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Roman Lavrov 4e073356 2023-04-13T15:16:53 Trace Interpreter: gzip cpp and run gold tests. New test step: angle_restricted_trace_gold_interpreted_tests similar to existing angle_restricted_trace_gold_tests but runs a subset of newest traces that have the right format. Currently there are 8 of them and the filter is hard-coded in test_suites.pyl. rise_of_empires can also be run interpreted but happened to flake during testing so it's not included for now. Trace cpp files are concatenated and gzipped as a build step producing gen/tracegz_{trace}.gz and these gz files are then distributed as part of the build --trace-interpreter flag changes from boolean to string to support: --trace-interpreter=gz: * this uses the gz file above * gold tests added in this CL use this option --trace-interpreter=c: * using uncompressed c/cpp file * existing angle_trace_interpreter_tests runs a retrace saving .c files and uses this option Bug: b/276742336 Change-Id: I69544f25bda873af191978195d02ffbdd34363c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4424690 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov aac84722 2023-04-13T12:10:25 Trace Interpreter: Allow running .cpp traces, not only .c .cpp vs .c is just the file extension, what actually matters is the trace format in which the trace was captured. For instance, fishdom is .cpp but can be run interpreted as is: out/Debug/angle_trace_tests --gtest_filter=TraceTest.fishdom --trace-interpreter Bug: b/276742336 Change-Id: I41b2bbc5ffe5ac7449913412b3eceb5c916b3803 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423870 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Roman Lavrov 2c7f31af 2023-04-13T11:47:34 Trace Interpreter: Move to a shared library. Based on https://crrev.com/c/4178024 but does only one thing: makes trace interpreter a shared library (as if it was a compiled trace) I am not sure what impact this actually has on the TracePerfTest callbacks (mentioned in the CL above) as I see onEglMakeCurrent callback getting called without this CL as well. Anyways, this makes things a bit more consistent. * Gets rid of TraceReplayInterface * TraceInterpreter is now an implementation detail * Need to additionally pass list of trace files to TraceLibrary (new SetTraceInfo replay export) * GetResourceIDMapValue is just moved as is to the right lib Bug: b/276742336 Change-Id: I67ea9fbcb4f7db999ab71c8443ea91c5631df942 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423869 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 735fb480 2023-04-13T09:34:57 Trace Interpreter: Support \\ escape sequences. This enables the 'catalyst_black' trace. Cloned from https://crrev.com/c/4178022 Bug: b/276742336 Change-Id: I9df703150504e7fcf4e18ff0a538aa3f6caddfdb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4423269 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill f093a9b3 2023-04-11T18:09:00 Trace Interpreter: Support gClientArrays Needed to run cut_the_rope, fishdom, other traces. Add cut_the_rope and fishdom to interpreter CI. CL cloned from https://crrev.com/c/4178021 Bug: b/276742336 Change-Id: If7da78ba3fd7c19262692d1386c5eaa47df2ca6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4415246 Reviewed-by: Cody Northrop <cnorthrop@google.com> Auto-Submit: Roman Lavrov <romanl@google.com> Commit-Queue: Roman Lavrov <romanl@google.com>
Roman Lavrov cef7dcbf 2023-04-11T16:12:12 Trace Interpreter: support harry_potter_hogwarts_mystery Handling of calls like: glGetBooleanv(GL_DEPTH_WRITEMASK, (GLboolean *)gReadBuffer); glGetFloatv(GL_DEPTH_CLEAR_VALUE, (GLfloat *)gReadBuffer); Add interpreted test to CI. Bug: b/276742336 Change-Id: Iae3ff9035044461ca1a208980c170d5d48d1a424 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4416166 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Gert Wollny 0e9b8f36 2023-02-08T13:39:09 Capture/Replay: Drop context ID from file and frame func names This is needed when we want to be able to deal with swap called from different contexts. Bug: angleproject:7911 Change-Id: I83023308109852179f434be2290b33b7844ddcda Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4236540 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Jamie Madill e960355a 2023-01-05T14:56:48 Trace Interpreter: Support DOTA underlords. Supports zero pointer parameters, which are used to indicate unwritten parameters. Bug: angleproject:7887 Change-Id: Ibee1d558567020eeeeb2ed6ac98f38cf985d87a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4140259 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2c4de3a7 2023-01-03T16:07:35 Trace Interpreter: Support Genshin Impact. Includes a couple fixes: - parsing hexidecimal values instead of enums - support sharing strings and functions between modules - support 32-bit int pointers Bug: angleproject:7887 Change-Id: I6e20a64a862c45c17ccde78a58d6069d83b31867 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4135797 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill 2c582dcb 2023-01-03T10:27:03 Trace Interpreter: Support Manhattan trace. Adds the following fixes and features: - support transform feedback varying strings - support infinity and NaN constants - support for sampler and query resources Bug: angleproject:7887 Change-Id: Ib01afe66e4fda9bc77d0cb5eed52fa83a694a7d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4126885 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill f7b5d5d1 2022-12-15T10:52:07 Capture/Replay: Remove inline variable declarations. This makes parsing easier for the "simplified C" interpreter. We introduce a resource ID buffer as a way to manage a list of resource IDs to replace the inline resource lists. Turns on the Among Us trace in the interpreter tests. Bug: angleproject:7775 Change-Id: I1bb9c0e9b087965a18691bc99b2e9947610b9eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4128719 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fdada9ee 2022-12-13T14:52:53 Re-land: "Make SyncIDs a packed type." This re-land fixes the sync map size tracking. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: If2114c51d5b68503890eacbf549182823667fedc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178012 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8971a592 2023-01-18T14:35:09 Revert "Make SyncIDs a packed type." This reverts commit 9de913077a5fcc3d2f2e327b56bbe30efe2fde96. Reason for revert: Fails win-trace, somewhat flakily. Original change's description: > Make SyncIDs a packed type. > > This prepares syncs to use a simple resource map like other > types, which will make life easier in the trace interpreter. > > Bug: angleproject:7775 > Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Cody Northrop <cnorthrop@google.com> Bug: angleproject:7775 Change-Id: I29534b14c973fa34a4cb7457d534cd6156f33cd2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4178010 Auto-Submit: Jamie Madill <jmadill@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jamie Madill 9de91307 2022-12-13T14:52:53 Make SyncIDs a packed type. This prepares syncs to use a simple resource map like other types, which will make life easier in the trace interpreter. Bug: angleproject:7775 Change-Id: Ic2867f6133256f5ce2320eb2b322c1059266b201 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4103720 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Geoff Lang 966f3bae 2022-10-24T13:27:48 Replace sprintf by snprintf in trace_interpreter.cpp sprintf has been deprecated and generates warnings. Bug: angleproject:7752 Change-Id: Id1483585397edba44e03f7e5e925d398882af2f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3975351 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill dc62b3ee 2022-10-10T21:00:16 Capture/Replay: Add trace interpreter. Also adds a self-test using the retrace script. Bug: angleproject:7752 Change-Id: I1985b47250bef99726d2ca2d90bef859208e357e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3965128 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>