What is Adaptyst?
On this page
Introduction
In the current development stage, Adaptyst is an open-source and language-agnostic code profiler for Linux, built on top of “perf” with custom patches:
- It samples both on-CPU and off-CPU activity of every spawned thread and process.
- It minimises risk of broken profiled stacks for programs compiled with frame pointers (i.e. in case of GCC, with
-fno-omit-frame-pointer
and-mno-omit-leaf-frame-pointer
if available) by detecting inappropriate kernel and CPU configurations automatically. - It performs cache-aware roofline profiling using the CARM Tool from INESC-ID (only x86-64 at the moment, the AMD CPU support is very experimental).
- Thanks to Adaptyst Analyser, it produces data for rendering interactive flame graphs and charts in a web browser along with cache-aware roofline plots (with an option to plot specific code segments as points on the roofline graphs).
- Its main functionality is designed with hardware portability in mind. Adaptyst has been successfully tested on the x86-64, arm64, and RISC-V instruction set architectures.
- It supports custom sampling-based “perf” events for profiling low-level software-hardware interactions.
- It allows TCP streaming of profiling data to a separate machine for real-time processing.
On-CPU profiling uses perf
with the task-clock
event. Off-CPU profiling is based on eBPF-implemented sampling explained with the diagram below (using the example of a single process with interleaving on-CPU and off-CPU activity; the diagram uses the old project name “AdaptivePerf”). The sampling period is calculated from a user-provided off-CPU sampling frequency.

Note
While Adaptyst is currently a profiler, the general goal of this performance analysis project is developing a software-hardware co-design framework scaling from edge/embedded/bare-metal computing to high-performance computing and with the strong element of compilation. The profiling features will still be present and maintained. See our roadmap for more details.
Adaptyst flow and components

As shown in the diagram above, the Adaptyst program flow starts with running the adaptyst
command-line tool, which
starts the adaptyst-server
component in the background by default (it is also possible to run the server on another
machine, see External instance of adaptyst-server) and configures and runs
“perf”. If roofline profiling is enabled and no cache-aware roofline benchmarks have been performed, adaptyst
runs
the CARM Tool to perform these benchmarks before starting “perf”.
During profiling, all events are pre-processed by “perf” in real time using the Adaptyst Python scripts and streamed to
adaptyst-server
(via file descriptors by default or TCP if an external instance is used), which takes care of proper
processing such as generating flame graph data and saving the results in a non-encrypted format to persistent storage.
Once your profiled program finishes executing, the results can be inspected in a variety of ways, including by our dedicated tool Adaptyst Analyser producing an interactive website.
Note
The flow internals are likely to change as part of implementing our roadmap, e.g. the patched-“perf”-arrangement will be replaced with an in-house equivalent not spawning any “perf” instances and not using any “perf” API.