libipt decodes Intel PT packets without owning your tool
libipt - an Intel(R) Processor Trace decoder library
At a glance
- What is it?
- libipt is Intel's reference implementation of the Intel Processor Trace decoder, written in C and built with CMake, usable standalone or partially integrated into an existing tool, with sample tools and a test system layered on top. It suits anyone building a trace analyser for Intel PT, and it is a decoder for a specific hardware trace format rather than a general tracing framework.
- Who is it for?
- Adopt libipt when you need to decode Intel Processor Trace packets correctly, especially on a platform where no vendor tool is available, and when you can work with the C API and its build. Do not adopt it for general application tracing, since it decodes one specific hardware trace format, and do not expect the sample tools to be a finished product.
- Can I use it commercially?
- Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A decoder for one specific trace format
The Intel Processor Trace Decoder Library is Intel's reference implementation for decoding Intel PT, and the README states that it can be used as a standalone library or partially or fully integrated into your tool. That dual role is the important design fact. Most tracing libraries arrive as a framework you adopt wholesale, with their own buffer management, their own output format and their own opinion about how a trace is presented. libipt does the opposite. The core is a packet encoder and decoder library, in the libipt/ directory, and everything else in the repository is optional and layered on top of it. If you are writing a trace viewer, a debugger, a converter or a validator, you link the library and keep your own user interface. The library is in C, which matters for a decoder that has to sit inside a larger tool, and it is licensed BSD-3-Clause, which is the permissive choice for code you intend to embed in a product rather than merely call.
The sample tools are the documentation
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, and the README says the samples demonstrate how to use the library and may serve as a starting point for integrating the library into your tool. There are six of them and each covers a different task. ptdump is an example implementation of a packet dumper, which is the closest thing to a reference usage of the decoder API. ptxed is an example implementation of a trace disassembler, and it is the most demanding of the set because it needs to turn raw packets into instructions. ptseg is a simple tool to find surrounding PSB packets, which is the practical first step when you have a trace and need to find a region. pttc is a trace test generator, which lets you produce traces rather than only consume them. ptunit is a simple unit test system. And pevent is a library for reading and writing Linux perf event records, which is how you line up a trace with the events a profiler collected.
The dependency list is short, and the optional parts are the point
The core build needs very little. The library uses cmake for building, described as the cross-platform open-source build system, and that is the only listed dependency for the library itself. The other packages are needed for some of the optional components, and the README is specific about which. xed, the Intel x86 instruction encoder and decoder, is needed to build and run ptxed, which makes sense since a disassembler has to understand instructions. yasm, the Yasm Modular Assembler, is needed to run pttc, since the test generator assembles code. And pandoc, a universal document converter, is needed for the man pages. So a consumer who only wants the decoder library needs cmake and nothing else, while someone who wants the disassembler also needs an instruction decoder and someone who wants the generator also needs an assembler. The trade-off is that the more of the toolchain you want, the more external moving parts you take on, and the ptxed path in particular pulls in the xed project.
sideband and pevent solve the two hard correlation problems
Two directories in the tree are worth singling out because they address the parts of trace work that are genuinely difficult. The sideband/ directory holds a sideband correlation library. In Intel PT, the useful execution trace is only part of the story, and correlating it with sideband data, which carries things like the timing and context information the processor emits alongside, is the part that turns a packet stream into something you can read. The pevent/ directory holds a library for reading and writing Linux perf event records, which is the second hard problem. When you capture a trace and a profile in the same run, you need both to be aligned to the same timeline, and the perf event format is what carries the other side of that alignment. The include/ directory holds a collection of substitute headers, and the script/ directory collects scripts for working with the output, so the repository is arranged as a small toolkit rather than a single program.
Building it, and what the doc directory covers
Building is a CMake project, with the top level CMakeLists.txt at the root and the source split across the libipt, pevent, ptdump, ptseg, pttc, ptunit, ptxed, sideband, script, test and include directories. The doc/ directory holds the documentation set, and the README enumerates what is in it. There is 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, and a document describing pttc. The man pages for the encoder and decoder library live under doc/man, which is where the pandoc dependency earns its place. A separate test/ directory holds a collection of tests, and the sample tools sit above them in the hierarchy, so the arrangement is the classic one where the test system exercises the samples that exercise the library. There is also a CONTRIBUTING file, a SECURITY.md, and a LICENSE file at the root, and a .gitignore.
Maintenance and where the boundaries are
The repository is not archived and the last push was on 2026-10-16, with releases v2.2 and v2.1.3 both dated 2025-11-20 and v2.1.2 from 2025-01-21. The version numbers are worth reading for what they imply. A major version 2 for a decoder library signals that the API has changed shape at least once, so a consumer should expect to do work when moving between the 1.x and 2.x lines, and it should pin a version rather than track a branch. The scope limits are equally clear. This decodes Intel Processor Trace, so it is useless without hardware that emits it, and the format is tied to specific processor generations, which means a decoder for a newer trace format is a new version of the library rather than a configuration change. It also does not produce the trace, it consumes it, so you still need a capture mechanism, and the documentation has a document on how to capture trace because that step is outside the library. For anything other than Intel PT, you would reach for a different tool entirely.
Editorial conclusion
Adopt libipt when you need to decode Intel Processor Trace packets correctly, especially on a platform where no vendor tool is available, and when you can work with the C API and its build. Do not adopt it for general application tracing, since it decodes one specific hardware trace format, and do not expect the sample tools to be a finished product. Verify first that your processor and firmware actually emit Intel PT, that you have the matching xed build available if you want ptxed, and that the trace you are decoding uses a packet version the library supports.
Frequently asked questions
What is libipt and what does it decode?
It is the Intel Processor Trace Decoder Library, described as Intel's reference implementation for decoding Intel PT. It can be used as a standalone library or partially or fully integrated into your tool, and the core is a packet encoder and decoder library in the libipt directory.
Which sample tools ship with libipt?
Six of them: ptdump, an example packet dumper, ptxed, an example trace disassembler, ptseg, a tool to find surrounding PSB packets, pttc, a trace test generator, ptunit, a simple unit test system, and pevent, a library for reading and writing Linux perf event records. A test system is built on top of the samples.
What do I need to build libipt?
cmake is the only dependency for the library itself. The optional components need more: xed, the Intel x86 instruction encoder and decoder, to build and run ptxed, yasm to run pttc, and pandoc to generate the man pages for the encoder and decoder library.
How do I correlate an Intel PT trace with profiler data?
The repository provides a sideband correlation library in the sideband directory, and pevent, a library for reading and writing Linux perf event records, so the trace and the perf events can be aligned on the same timeline. The doc directory also includes a document describing how to capture trace.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/intel-libipt)Was this useful?