[Lldb-commits] [PATCH] D86899: [trace][RFC] create skeleton for thread decoder
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 31 16:43:28 PDT 2020
wallace created this revision.
wallace added a reviewer: clayborg.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
wallace requested review of this revision.
Herald added a subscriber: JDevlieghere.
Depends on D86670 <https://reviews.llvm.org/D86670>.
I first just want to get feedback about the structures of the class in this patch, later I con polish it.
This adds the skeleton for decoding traces of threads. The first step is having the plug-in implementation decode its trace into raw instructions. Individual instructions can sometimes fail to be decoded, so the instruction class should have an is_error flag. Error are quite sporadic though.
I'm adding a TraceThread class that contains all the information needed to decode a trace. I'm creating another class TraceDecodedThread will is obtained by calling TraceThread::Decode and its existance indicates that decoding didn't fail and you can use that class for inspecting the decoding trace.
This means that TraceThread is like an initialization object, and then the analysis is done by the TraceDecodedTrace class, which splits responsibilities and makes error handling easier.
I added some comments in Trace.h as well.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86899
Files:
lldb/include/lldb/Target/Trace.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
lldb/source/Target/Trace.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86899.289042.patch
Type: text/x-patch
Size: 9217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200831/8d26e721/attachment.bin>
More information about the lldb-commits
mailing list