[all-commits] [llvm/llvm-project] 05b4bf: [trace][intelpt] Introduce instruction Ids

walter erquinigo via All-commits all-commits at lists.llvm.org
Wed Apr 6 12:19:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 05b4bf2571244da2cef438e907036b35a0e1f99a
      https://github.com/llvm/llvm-project/commit/05b4bf2571244da2cef438e907036b35a0e1f99a
  Author: Walter Erquinigo <wallace at fb.com>
  Date:   2022-04-06 (Wed, 06 Apr 2022)

  Changed paths:
    M lldb/include/lldb/Target/TraceCursor.h
    M lldb/include/lldb/Target/TraceInstructionDumper.h
    M lldb/source/Commands/CommandObjectThread.cpp
    M lldb/source/Commands/Options.td
    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/TraceCursorIntelPT.cpp
    M lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.h
    M lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
    M lldb/source/Target/TraceInstructionDumper.cpp
    M lldb/test/API/commands/trace/TestTraceDumpInstructions.py
    M lldb/test/API/commands/trace/TestTraceStartStop.py
    A lldb/test/API/commands/trace/TestTraceTSC.py
    R lldb/test/API/commands/trace/TestTraceTimestampCounters.py

  Log Message:
  -----------
  [trace][intelpt] Introduce instruction Ids

In order to support quick arbitrary access to instructions in the trace, we need
each instruction to have an id. It could be an index or any other value that the
trace plugin defines.

This will be useful for reverse debugging or for creating callstacks, as each
frame will need an instruction id associated with them.

I've updated the `thread trace dump instructions` command accordingly. It now
prints the instruction id instead of relative offset. I've also added a new --id
argument that allows starting the dump from an arbitrary position.

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




More information about the All-commits mailing list