This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFCI] DecodedThread::TraceItemStorage::error should own its own data
ClosedPublic

Authored by bulbazord on Jun 6 2023, 6:13 PM.

Details

Summary

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.

Diff Detail

Event Timeline

bulbazord created this revision.Jun 6 2023, 6:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 6:13 PM
bulbazord requested review of this revision.Jun 6 2023, 6:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 6:13 PM
wallace accepted this revision.Jun 6 2023, 6:13 PM

lgtm!

This revision is now accepted and ready to land.Jun 6 2023, 6:13 PM