llvm-project/lldb/source
Walter Erquinigo a7d6c3effe [trace] Make events first class items in the trace cursor and rework errors
We want to include events with metadata, like context switches, and this
requires the API to handle events with payloads (e.g. information about
such context switches). Besides this, we want to support multiple
similar events between two consecutive instructions, like multiple
context switches. However, the current implementation is not good for this because
we are defining events as bitmask enums associated with specific
instructions. Thus, we need to decouple instructions from events and
make events actual items in the trace, just like instructions and
errors.

- Add accessors in the TraceCursor to know if an item is an event or not
- Modify from the TraceDumper all the way to DecodedThread to support
- Renamed the paused event to disabled.
- Improved the tsc handling logic. I was using an API for getting the tsc from libipt, but that was an overkill that should be used when not processing events manually, but as we are already processing events, we can more easily get the tscs.
event items. Fortunately this simplified many things
- As part of this refactor, I also fixed and long stating issue, which is that some non decoding errors were being inserted in the decoded thread. I changed this so that TraceIntelPT::Decode returns an error if the decoder couldn't be set up proplerly. Then, errors within a trace are actual anomalies found in between instrutions.

All test pass

Differential Revision: https://reviews.llvm.org/D128576
2022-06-29 09:19:51 -07:00
..
API Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
Breakpoint [lld] Don't use Optional::hasValue (NFC) 2022-06-26 19:29:40 -07:00
Commands [trace] Make events first class items in the trace cursor and rework errors 2022-06-29 09:19:51 -07:00
Core [lld] Don't use Optional::hasValue (NFC) 2022-06-26 19:29:40 -07:00
DataFormatters [lldb] Add setting for max depth of value object printing (NFC) 2022-05-03 10:39:42 -07:00
Expression Support expressions in the context of a reference 2022-06-21 14:30:07 +02:00
Host [lldb] Add a log dump command 2022-06-27 10:02:34 -07:00
Initialization [lldb] Remove FileSystem::Initialize from FileCollector 2022-03-03 13:22:38 -08:00
Interpreter Have CommandObjectParsed check for "commands that take no arguments". 2022-06-27 15:14:41 -07:00
Plugins [trace] Make events first class items in the trace cursor and rework errors 2022-06-29 09:19:51 -07:00
Symbol [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
Target [trace] Make events first class items in the trace cursor and rework errors 2022-06-29 09:19:51 -07:00
Utility [lldb] Add a log dump command 2022-06-27 10:02:34 -07:00
Version [lldb] Fix LLDB_FULL_VERSION_STRING 2022-01-19 14:20:22 -08:00
CMakeLists.txt [lldb] Make lldbVersion a full fledged library 2021-12-08 15:14:34 -08:00