Skip to content

Realtime VOGL Trace Editing

tobin-lunarg edited this page Aug 4, 2014 · 1 revision

VOGL has the capability to replay a json file of API calls directly. If you run from a json file with the --endless option, you can interactively edit the trace input json files and data blobs in order to see the effect of any new edits on the next pass through the trace.

This can be very useful for experimentation and debug, but prior to running in this mode it is recommended that you first run via the editor and/or analyze some json file to identify the specific state that you'll want to experiment with.

Here are the basic details of how to take advantage of this mode of operation.

  1. First you need to dump the the binary trace file into json trace file format
    1. The basic format of the cmd is vogl[32|64] dump <input_tracefile>.bin <output_dump_dir><file_prefix>
    2. A concrete example: ./vogl64 dump ~/traces/gamex/gamex_trace.bin ~/traces/gamex/dump/dbg_dump
  2. In your dump output directory you'll now have a file named "<file_prefix>_trace_archive.zip"
    1. Extract the contents of "<file_prefix>_trace_archive.zip" to reside in <output_dump_dir>.
    2. Rename "<file_prefix>_trace_archive.zip" to something like "<file_prefix>_trace_archive.zip.orig"
    3. Renaming the file causes vogl to use the extracted data on replay, rather than the data from the zip archive.
  3. Replay the json frame0 API file from the dump directory with the "--endless" options
    1. The basic cmd is vogl[32|64] replay <output_dump_dir><file_prefix>_000000.json --endless
    2. From our example above, exact cmd would be: ./vogl64 dump ~/traces/gamex/dump/dbg_dump_000000.json --endless
  4. Edit input data of interest on the fly.
    1. Once you save your changes, they should be loaded on the next loop through the replay.
    2. If you don't think that changes are being properly loaded, it's possible VOGL is caching some state. In this case, exit the replay and start over to verify that your updates are picked up.