[all-commits] [llvm/llvm-project] f9b4ea: [trace] Add SBTraceCursor bindings

Jakob Johnson via All-commits all-commits at lists.llvm.org
Tue Aug 2 16:55:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9b4ea0ce9efb4132a75551c40b2efc049e5b9f7
      https://github.com/llvm/llvm-project/commit/f9b4ea0ce9efb4132a75551c40b2efc049e5b9f7
  Author: Jakob Johnson <johnsonjakob99 at gmail.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M lldb/bindings/interface/SBTrace.i
    A lldb/bindings/interface/SBTraceCursor.i
    M lldb/bindings/interfaces.swig
    M lldb/include/lldb/API/SBDefines.h
    M lldb/include/lldb/API/SBTrace.h
    A lldb/include/lldb/API/SBTraceCursor.h
    M lldb/include/lldb/Target/TraceCursor.h
    M lldb/include/lldb/lldb-defines.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/API/CMakeLists.txt
    M lldb/source/API/SBTrace.cpp
    A lldb/source/API/SBTraceCursor.cpp
    M lldb/source/Commands/CommandObjectThread.cpp
    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/TraceDumper.cpp
    M lldb/test/API/commands/trace/TestTraceLoad.py

  Log Message:
  -----------
  [trace] Add SBTraceCursor bindings

Add bindings for the `TraceCursor` to allow for programatic traversal of
traces.
This diff adds bindings for all public `TraceCursor` methods except
`GetHwClock` and also adds `SBTrace::CreateNewCursor`. A new unittest
has been added to TestTraceLoad.py that uses the new `SBTraceCursor` API
to test that the sequential and random access APIs of the `TraceCursor`
are equivalent.

This diff depends on D130925.

Test Plan:
`ninja lldb-dotest && ./bin/lldb-dotest -p TestTraceLoad`

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




More information about the All-commits mailing list