[lldb][trace] Add a basic function call dump [3] - Add a JSON dumper
authorWalter Erquinigo <wallace@fb.com>
Sun, 16 Oct 2022 01:52:22 +0000 (18:52 -0700)
committerWalter Erquinigo <wallace@fb.com>
Tue, 18 Oct 2022 20:57:53 +0000 (13:57 -0700)
commitf1e63855b08e366dc9d3bf1d3394a8f5c77ab3a6
tree146f982e091cae27b1319648103bea74ca357fbf
parent840d861d6e524637a96fe9b7f6d2d77091521167
[lldb][trace] Add a basic function call dump [3] - Add a JSON dumper

The JSON dumper is very minimalistic. It pretty much only shows the
delimiting instruction IDs of every segment, so that further queries to
the SBCursor can be used to make sense of the data. It's main purpose is
to be serialized somewhat cheaply.

I also renamed untracedSegment to untracedPrefixSegment, in case in the
future we add an untracedSuffixSegment. In any case, this new name is
more explicit, which I like.

Differential Revision: https://reviews.llvm.org/D136034
lldb/include/lldb/Target/TraceDumper.h
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Target/TraceDumper.cpp
lldb/test/API/commands/trace/TestTraceDumpFunctionCalls.py