[Lldb-commits] [PATCH] D123358: [trace][intelpt] Remove code smell when printing the raw trace size

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 7 21:00:51 PDT 2022


wallace created this revision.
wallace added reviewers: jj10306, zrthxn.
Herald added a project: All.
wallace requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Something ugly I did was to report the trace buffer size to the DecodedThread,
which is later used as part of the `dump info` command. Instead of doing that,
we can just directly ask the trace for the raw buffer and print its size.

I thought about not asking for the entire trace but instead just for its size,
but in this case, as our traces as not extremely big, I prefer to ask for the
entire trace, ensuring it could be fetched, and then print its size.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123358

Files:
  lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
  lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
  lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
  lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123358.421405.patch
Type: text/x-patch
Size: 5585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220408/a3cbc9f1/attachment.bin>


More information about the lldb-commits mailing list