[all-commits] [llvm/llvm-project] 1e5083: [trace][intel pt] Handle better tsc in the decoder

walter erquinigo via All-commits all-commits at lists.llvm.org
Sat Apr 2 11:07:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e5083a563f8aca294feda60dcb4a814623ba321
      https://github.com/llvm/llvm-project/commit/1e5083a563f8aca294feda60dcb4a814623ba321
  Author: Walter Erquinigo <wallace at fb.com>
  Date:   2022-04-02 (Sat, 02 Apr 2022)

  Changed paths:
    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/IntelPTDecoder.cpp
    M lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
    M lldb/test/API/commands/trace/TestTraceDumpInfo.py

  Log Message:
  -----------
  [trace][intel pt] Handle better tsc in the decoder

A problem that I introduced in the decoder is that I was considering TSC decoding
errors as actual instruction errors, which mean that the trace has a gap. This is
wrong because a TSC decoding error doesn't mean that there's a gap in the trace.
Instead, now I'm just counting how many of these errors happened and I'm using
the `dump info` command to check for this number.

Besides that, I refactored the decoder a little bit to make it simpler, more
readable, and to handle TSCs in a cleaner way.

Differential Revision: https://reviews.llvm.org/D122867




More information about the All-commits mailing list