[all-commits] [llvm/llvm-project] 21555f: [intel-pt][trace] Implement a "get supported trace...

walter erquinigo via All-commits all-commits at lists.llvm.org
Wed Nov 11 10:36:27 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 21555fff4de811309ea7935f9cb65578c957d77f
      https://github.com/llvm/llvm-project/commit/21555fff4de811309ea7935f9cb65578c957d77f
  Author: Walter Erquinigo <a20012251 at gmail.com>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M lldb/docs/lldb-gdb-remote.txt
    M lldb/include/lldb/Host/common/NativeProcessProtocol.h
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/Target/Trace.h
    M lldb/include/lldb/Utility/StringExtractorGDBRemote.h
    M lldb/include/lldb/Utility/TraceOptions.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    M lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
    M lldb/source/Plugins/Process/Linux/ProcessorTrace.cpp
    M lldb/source/Plugins/Process/Linux/ProcessorTrace.h
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    M lldb/source/Utility/CMakeLists.txt
    M lldb/source/Utility/StringExtractorGDBRemote.cpp
    A lldb/source/Utility/TraceOptions.cpp
    M lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp

  Log Message:
  -----------
  [intel-pt][trace] Implement a "get supported trace type" packet

Depends on D89283.

The goal of this packet (jTraceGetSupportedType) is to be able to query the gdb-server for the tracing technology that can work for the current debuggeer, which can make the user experience simpler but allowing the user to simply type

  thread trace start

to start tracing the current thread without even telling the debugger to use "intel-pt", for example. Similarly, `thread trace start [args...]` would accept args beloging to the working trace type.

Also, if the user typed

  help thread trace start

We could directly show the help information of the trace type that is supported for the target, or mention instead that no tracing is supported, if that's the case.

I added some simple tests, besides, when I ran this on my machine with intel-pt support, I got

  $ process plugin packet send "jTraceSupportedType"
    packet: jTraceSupportedType
  response: {"description":"Intel Processor Trace","pluginName":"intel-pt"}

On a machine without intel-pt support, I got

  $ process plugin packet send "jTraceSupportedType"
    packet: jTraceSupportedType
  response: E00;

Reviewed By: clayborg, labath

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




More information about the All-commits mailing list