Introduce rr dump --json, dump trace in JSONL, one object per line - #4092
Open
timo wants to merge 1 commit into
Open
Introduce rr dump --json, dump trace in JSONL, one object per line#4092timo wants to merge 1 commit into
rr dump --json, dump trace in JSONL, one object per line#4092timo wants to merge 1 commit into
Conversation
timo
force-pushed
the
rr_dump_json_format
branch
from
August 14, 2026 15:30
2543682 to
9b1ee6c
Compare
timo
marked this pull request as ready for review
August 14, 2026 15:31
timo
force-pushed
the
rr_dump_json_format
branch
3 times, most recently
from
August 14, 2026 16:07
cf05bfc to
ad998be
Compare
Combines with some of the other flags: * `--syscallbuf` adds a `syscalls` key * `--mmaps` adds a `maps` key * `--task_events` adds a `task_events` key * `--recorded-metadata` adds a `metadata` key Furthermore, also passing `--raw` will add extra output to some of the above: * `syscallbuf_flush_raw` key with the header of a syscallbuf flush * `raw` key with the syscall data for each syscall * `raw` key with mmap record data to mmaps entries On top of all that, a `--no-regs` flag is introduced that skips outputting register values in the regular, the raw, or the json output. This also moves write_hex_string from being a static function inside GdbServerConnection to live in src/util.cc instead.
timo
force-pushed
the
rr_dump_json_format
branch
from
August 14, 2026 17:07
ad998be to
b458af5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combines with some of the other flags:
--syscallbufadds asyscallskey--mmapsadds amapskey--task_eventsadds atask_eventskey`--recorded-metadataadds ametadatakeyFurthermore, also passing
--rawwill add extra output to some of the above:syscallbuf_flush_rawkey with the header of a syscallbuf flushrawkey with the syscall data for each syscallrawkey with mmap record data to mmaps entriesOn top of all that, a
--no-regsflag is introduced that skips outputtingregister values in the regular, the raw, or the json output.
This also moves write_hex_string from being a static function inside
GdbServerConnection to live in src/util.cc instead.
Here's some example output:
https://gist.github.com/timo/d6dd3b2762d78a9ee468b3cb554fa6b9
Open questions:
flags.json_dumpin-line. Is there a preference?frame.event().record_extra_regs()is true; do we care about that?--rawstill has three entries in it that correspond to field that are not being output any more. Is that for a separate pull request, or fine to include here?--rawoutputs in a different format, and--jsonmakes the same claim, so it's not obvious that they can be combined. The current behaviour of--rawand--jsontogether may want to get a different flag and then--rawcould conflict with--json--format=raw/--format=jsonoption instead? though a short flag for json would be nice