[trace][intel pt] Create a class for the libipt decoder wrapper
authorWalter Erquinigo <wallace@fb.com>
Fri, 1 Apr 2022 18:44:51 +0000 (11:44 -0700)
committerWalter Erquinigo <wallace@fb.com>
Thu, 7 Apr 2022 22:58:34 +0000 (15:58 -0700)
commit6423b50235212db4c3a2e673b2b59fa5f6e07ec0
treeb1ed11f575210e44871c3694193ada427f4654e3
parent47130384257a6c68e5ebcda74610fbec0d25f0a3
[trace][intel pt] Create a class for the libipt decoder wrapper

As we soon will need to decode multiple raw traces for the same thread,
having a class that encapsulates the decoding of a single raw trace is
a stepping stone that will make the coming features easier to implement.

So, I'm creating a LibiptDecoder class with that purpose. I refactored
the code and it's now much more readable. Besides that, more comments
were added. With this new structure, it's also easier to implement unit
tests.

Differential Revision: https://reviews.llvm.org/D123106
lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt
lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.cpp [deleted file]
lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp [new file with mode: 0644]
lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h [new file with mode: 0644]
lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp [new file with mode: 0644]
lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h [moved from lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.h with 90% similarity]
lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h