[all-commits] [llvm/llvm-project] 4bae70: [lldb][NFCI] DecodedThread::TraceItemStorage::erro...
Alex via All-commits
all-commits at lists.llvm.org
Thu Jun 8 12:21:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4bae706682d5b621884ff2f7014ba4eb8cb636aa
https://github.com/llvm/llvm-project/commit/4bae706682d5b621884ff2f7014ba4eb8cb636aa
Author: Alex Langford <alangford at apple.com>
Date: 2023-06-08 (Thu, 08 Jun 2023)
Changed paths:
M lldb/include/lldb/Target/TraceCursor.h
M lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp
M lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
M lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp
M lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.h
Log Message:
-----------
[lldb][NFCI] DecodedThread::TraceItemStorage::error should own its own data
The way it works now, it stores a `const char *` that it does not
explicitly own. It's owned by the ConstString StringPool. This is purely
to manage its lifetime, we don't really benefit from deduplication (nor
should we try to, they are errors). We also don't really benefit from
quick comparisons.
This may make the size of TraceItemStorage larger, but you have to pay
the cost of owning the data somewhere. The ConstString StringPool is an
attractive choice but ultimately a poor one.
Differential Revision: https://reviews.llvm.org/D152326
More information about the All-commits
mailing list