libipt - an Intel(R) Processor Trace decoder library
C CMake Shell C++
Clone or download
markus-metzger version: bump major version number
Changes:
  - add pt_insn_asid() and pt_blk_asid()
  - add event system
    - add resumed to struct pt_event.variant.enabled
    - add pt_insn_event() and pt_blk_event()
    - remove struct pt_insn flags
    - add tick events
    - add cbr events
    - add mnt events
  - indicate enabled state in pts_status bit-vector returned by most functions
  - indicate overflows while tracing is disabled
  - support power event tracing packets
  - support ptwrite
  - renumber enum pt_packet_type
  - move packet decode enums to internal header
  - reorder iclass and isid in struct pt_insn
  - add errors pte_overflow and pte_bad_file
  - add sideband correlation library
    - support decoding Linux perf_event records
    - support correlating Linux perf_event sideband
    - add scripts to post-process perf's perf.data file
  - support running PTT tests via ctest
  - address new gcc and clang warnings
  - work around skl014, apl11, apl12
  - support cpu 6/142, 6/158, 6/85, 6/122
  - add contribution guidelines
  - add an image section cache
  - add end_on_jump block decoder option
  - diagnose unknown cpus with -pte_bad_error
  - synchronized at partially consumed PSB
  - bug-fixes
  - ptunit:
    - destroy only initialized test fixtures
    - remove temporary files after closing them
    - test programs return the number of fails
  - ptxed:
    - print events
    - change relative order of [interrupt] and [aborted]
    - add --event:tick   request tick events.
    - add --sb:compact   print sideband records in compact form
    - add --sb:verbose   print sideband records in verbose form
    - add --sb:time      print the sideband record's timestamp
    - add --sb:filename  print the sideband filename
    - add --sb:offset    print the offset into the sideband file
    - add --sb:warn      print warnings for all kinds of losses
    - add --pevent:primary/secondary <file>[:<from>[-<to>]]
                              load a perf_event sideband stream from <file>.
                              an optional offset or range can be given.
    - add --pevent:sample-type <val>  set perf_event_attr.sample_type
    - add --pevent:time-zero <val>    set perf_event_mmap_page.time_zero
    - add --pevent:time-shift <val>   set perf_event_mmap_page.time_shift
    - add --pevent:time-mult <val>    set perf_event_mmap_page.time_mult
    - add --pevent:tsc-offset <val>   show perf events <val> ticks earlier.
    - add --pevent:kernel-start <val> the start address of the kernel.
    - add --pevent:sysroot <path>     prepend <path> to sideband filenames.
    - add --pevent:kcore <file>       load the kernel from a core dump.
    - add --pevent:vdso-x64 <file>    use <file> as 64-bit vdso.
    - add --pevent:vdso-x32 <file>    use <file> as x32 vdso.
    - add --pevent:vdso-ia32 <file>   use <file> as 32-bit vdso.
    - reformat output of --verbose
    - add --iscache-limit <limit>     set the image section cache limit
   - ptdump:
    - add --sb:compact   print sideband records in compact form
    - add --sb:verbose   print sideband records in verbose form
    - add --sb:time      print the sideband record's timestamp
    - add --sb:filename  print the sideband filename
    - add --sb:offset    print the offset into the sideband file
    - add --pevent:primary/secondary <file>[:<from>[-<to>]]
                              load a perf_event sideband stream from <file>.
                              an optional offset or range can be given.
    - add --pevent:sample-type <val>  set perf_event_attr.sample_type
    - add --pevent:time-zero <val>    set perf_event_mmap_page.time_zero
    - add --pevent:time-shift <val>   set perf_event_mmap_page.time_shift
    - add --pevent:time-mult <val>    set perf_event_mmap_page.time_mult
    - add --pevent:tsc-offset <val>   show perf events <val> ticks earlier.
    - add --pevent:kernel-start <val> the start address of the kernel.
    - add --pevent:sysroot <path>     ignored.
    - add --pevent:kcore <file>       ignored.
    - add --pevent:vdso-x64 <file>    ignored.
    - add --pevent:vdso-x32 <file>    ignored.
    - add --pevent:vdso-ia32 <file>   ignored.
  - pttc:
    - add new @sb directives:
      primary    open a primary sideband file and set as current
      secondary  open a secondary sideband file and set as current
      raw-8      write 8 bit into the current trace/sideband file
      raw-16     write 16 bit into the current trace/sideband file
      raw-32     write 32 bit into the current trace/sideband file
      raw-64     write 64 bit into the current trace/sideband file
      pevent-sample_type         specify the samples associated with subsequent
                                 pevent directives
      pevent-mmap-section        describe memory mapping of a yasm section
      pevent-lost                describe loss of pevent records
      pevent-comm                describe command being traced
      pevent-exit                describe thread exit
      pevent-fork                describe thread create
      pevent-aux                 describe new data in aux buffer
      pevent-itrace-start        describe that tracing started
      pevent-lost-samples        describe the loss of sample records
      pevent-switch              describe a context switch
      pevent-switch-cpu-wide     describe a context switch
    - print name of sideband files

Change-Id: I911466fc953c8cec3bee74ad6811de11ea5777a6
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Latest commit 43fd8b9 Jul 30, 2018

README

Intel(R) Processor Trace Decoder Library
========================================

The Intel Processor Trace (Intel PT) Decoder Library is Intel's reference
implementation for decoding Intel PT.  It can be used as a standalone library or
it can be partially or fully integrated into your tool.

The library comes with a set of sample tools built on top of it and a test
system built on top of the sample tools.  The samples demonstrate how to use the
library and may serve as a starting point for integrating the library into your
tool.

Go to https://software.intel.com/en-us/intel-platform-analysis-library for
support of upcoming (non-public) processors (NDA required).


Contents
--------

  README        this file

  libipt        A packet encoder/decoder library


Optional Contents and Samples
-----------------------------

  ptdump        Example implementation of a packet dumper

  ptxed         Example implementation of a trace disassembler

  pttc          A trace test generator

  ptunit        A simple unit test system

  sideband      A sideband correlation library

  pevent        A library for reading/writing Linux perf event records

  script        A collection of scripts

  test          A collection of tests

  include       A collection of substitute headers

  doc           A document describing the build
                A document describing how to get started
                A document describing the usage of the decoder library
                A document describing how to capture trace
                A document describing pttc

  doc/man       Man pages for the encoder/decoder library


Dependencies
------------

We use cmake for building.

  cmake         The cross-platform open-source build system.
                http://www.cmake.org


Other packages you need for some of the above optional components.

  xed           The Intel x86 instruction encoder and decoder.
                https://github.com/intelxed/xed

                This is needed to build and run ptxed.

  yasm          The Yasm Modular Assembler
                http://github.com/yasm

                This is needed to run pttc.

  pandoc        A universal document converter
                http://pandoc.org

                This is needed for man pages.