aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorWalter Erquinigo <wallace@fb.com>2022-06-24 14:02:47 -0700
committerWalter Erquinigo <wallace@fb.com>2022-06-29 09:19:51 -0700
commita7d6c3effe93954ecad634eebbcc59fc6856c3d9 (patch)
treeedac3b8e26403892df19fd540c4162ed23ed613d /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent7cbfb4eb7a9e24ede4a59e9c08d91747d8475e03 (diff)
downloadllvm-a7d6c3effe93954ecad634eebbcc59fc6856c3d9.zip
llvm-a7d6c3effe93954ecad634eebbcc59fc6856c3d9.tar.gz
llvm-a7d6c3effe93954ecad634eebbcc59fc6856c3d9.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions