[all-commits] [llvm/llvm-project] d52ba4: [trace] Introduce Hierarchical Trace Representatio...

walter erquinigo via All-commits all-commits at lists.llvm.org
Wed Jul 28 13:57:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d52ba48821301c33650b97cd9f262615fcc0fdc1
      https://github.com/llvm/llvm-project/commit/d52ba48821301c33650b97cd9f262615fcc0fdc1
  Author: Walter Erquinigo <wallace at fb.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    A lldb/docs/htr.rst
    M lldb/source/Plugins/TraceExporter/CMakeLists.txt
    A lldb/source/Plugins/TraceExporter/common/CMakeLists.txt
    A lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
    A lldb/source/Plugins/TraceExporter/common/TraceHTR.h
    M lldb/source/Plugins/TraceExporter/ctf/CMakeLists.txt
    M lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
    M lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.h
    M lldb/source/Plugins/TraceExporter/ctf/TraceExporterCTFOptions.td
    A lldb/test/API/commands/trace/TestTraceExport.py
    A lldb/test/API/commands/trace/intelpt-trace/export_ctf_test_program.cpp
    A lldb/test/API/commands/trace/intelpt-trace/export_ctf_test_program.out

  Log Message:
  -----------
  [trace] Introduce Hierarchical Trace Representation (HTR) and add  command for Intel PT trace visualization

This diff introduces Hierarchical Trace Representation (HTR) and creates the `thread trace export ctf  -f <filename> -t <thread_id>` command to export an Intel PT trace's HTR to Chrome Trace Format (CTF) for visualization.

See `lldb/docs/htr.rst` for context/documentation on HTR.

**Overview of Changes**
    - Add HTR documentation (see `lldb/docs/htr.rst`)
    - Add HTR structures (layer, block, block metadata)
    - Implement "Basic Super Block" HTR pass
    - Add 'thread trace export ctf' command to export the HTR of an Intel PT
      trace to Chrome Trace Format (CTF)

As this diff is the first iteration of HTR and trace visualization, future diffs will build on this work by generalizing the internal design of HTR and implementing new HTR passes that provide better trace summarization/visualization.

See attached video for an example of Intel PT trace visualization:
{F17851042}

Original Author: jj10306

Submitted by: wallace

Reviewed By: wallace, clayborg

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




More information about the All-commits mailing list