60x speed-up of Linux “perf”

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • linux

    Linux kernel source tree

  • Linux releases as GPLv2 or later for example”

    Linux doesn’t use “or later”. https://github.com/torvalds/linux/blob/master/COPYING:

    The Linux Kernel is provided under:

    SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note

    Being under the terms of the GNU General Public License version 2 only,

  • gimli

    A library for reading and writing the DWARF debugging format (by gimli-rs)

  • I haven't blogged about this yet, but we saw a 1000x fold speed-up doing several things around symbolication. The more optimal approach we found was to use the gimli crate[1] directly & carefully optimize it to read in the data structures for the executable(s) you are symbolicating upfront & then issuing in-process queries. They also have a drop-in replacement of addr2line that outperforms it (both in symbolication speed & memory usage).

    [1] https://github.com/gimli-rs/gimli

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • addr2line

    A cross-platform `addr2line` clone written in Rust, using `gimli`

  • honggfuzz

    Security oriented software fuzzer. Supports evolutionary, feedback-driven fuzzing based on code coverage (SW and HW based)

  • Here's the libbfd-based code in case anyone would like to port it, it's basically addr2line.

    https://github.com/google/honggfuzz/blob/master/linux/bfd.c

  • AFLplusplus

    The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!

  • With AFL++ you can even determine exactly where the fork happens:

    https://github.com/AFLplusplus/AFLplusplus/blob/stable/instr...

  • stacktrace

    C++ library for storing and printing backtraces. (by boostorg)

  • I do know Boost.Stacktrace calls addr2line too. From the code(https://github.com/boostorg/stacktrace/blob/develop/include/...), it seems Boost.Stacktrace also shells out to addr2line for every address. But in practice, I found the overhead of boost::stacktrace::stacktrace() is not as horrendous as my crappy implementation, which calls addr2line, too.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts