[Lldb-commits] [PATCH] D88841: [intel pt] Refactor parsing

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 6 16:25:38 PDT 2020


wallace updated this revision to Diff 296562.
wallace marked 10 inline comments as done.
wallace added a comment.

Address issues based on this diff's comments and from conversations with Greg.

- I'm still keeping the TraceSessionFile name instead of TraceSettings, as later there'll be actual trace settings (e.g. size of an Intel PT trace buffer, whether to trace in a ring or non-ring buffer, etc.).
- As Greg asked, I'm bringing back the top-level TraceSessionFileParser class, which each plug-in should override to perform parsing. This time the implementation is much cleaner and the implementation class can decide what to reuse from the base class. This will help ensuring that all Trace plug-ins consistently use the same common schema and parsing logic.
- Improved comments overall.
- Now, as Pavel suggested, I'm storing the schema in the PluginInstance, which allows fetching schemas without needing to instantiate any class. With this I was able able to simplify and remove several constructors.
- Fixed the header guards
- Some small fixes here are there, following the comments in the diff.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88841/new/

https://reviews.llvm.org/D88841

Files:
  lldb/include/lldb/Core/PluginManager.h
  lldb/include/lldb/Target/Trace.h
  lldb/include/lldb/Target/TraceSessionFileParser.h
  lldb/include/lldb/Target/TraceSettingsParser.h
  lldb/include/lldb/lldb-forward.h
  lldb/include/lldb/lldb-private-interfaces.h
  lldb/source/Commands/CommandObjectTrace.cpp
  lldb/source/Core/PluginManager.cpp
  lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt
  lldb/source/Plugins/Trace/intel-pt/ThreadIntelPT.cpp
  lldb/source/Plugins/Trace/intel-pt/ThreadIntelPT.h
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSessionFileParser.cpp
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSessionFileParser.h
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.cpp
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.h
  lldb/source/Target/CMakeLists.txt
  lldb/source/Target/Trace.cpp
  lldb/source/Target/TraceSessionFileParser.cpp
  lldb/source/Target/TraceSettingsParser.cpp
  lldb/test/API/commands/trace/TestTraceLoad.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88841.296562.patch
Type: text/x-patch
Size: 59543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201006/928bfd84/attachment-0001.bin>


More information about the lldb-commits mailing list