diff options
author | Jakob Johnson <johnsonjakob99@gmail.com> | 2022-10-24 07:01:40 -0700 |
---|---|---|
committer | Jakob Johnson <johnsonjakob99@gmail.com> | 2022-10-26 11:37:30 -0700 |
commit | f6eb089734ddbd7f9b9935a122ff4ad658f06360 (patch) | |
tree | be30125f2750a85197d3839908d6f3f6e2f7d144 /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | fccff3f11a7d23bd28b6d92b6ae3f9d33633734a (diff) | |
download | llvm-f6eb089734ddbd7f9b9935a122ff4ad658f06360.zip llvm-f6eb089734ddbd7f9b9935a122ff4ad658f06360.tar.gz llvm-f6eb089734ddbd7f9b9935a122ff4ad658f06360.tar.bz2 |
[trace][intelpt] Fix multi CPU decoding TSC assertion error
Occasionally the assertion that enforces increasing TSC values in `DecodedThread::NotifyTsc`
would get tripped during large multi CPU trace decoding.
The root cause of this issue was an assumption that all the data of a
PSB will fit within the start,end TSC of the "owning"
`ThreadContinuousExecution`. After investigating, this is not the case
because PSBs can have multiple TSCs.
This diff works around this issue by introducing a TSC upper bound for
each `PSBBlockDecoder`. This fixes the assertion failure by simply
"dropping" the remaining data of PSB whenever the TSC upper bound is
exceeded during decoding.
Future work will do a larger refactor of the multi CPU decoding to
remove the dependencies on this incorrect assumption so that PSB blocks
that span multiple `ThreadContinuousExecutions` are correctly handled.
correctly
Test Plan:
Differential Revision: https://reviews.llvm.org/D136610
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions