Skip to content

Releases: osyoyu/pf2

v0.14.0

25 Jan 11:15

Choose a tag to compare

Added

  • Pf2.profile can now directly write a Firefox Profiler-compatible profile into a file or an IO-ish object. Check out Pf2.profile's out: and format: option.
  • An experimental pprof-compatible recorder has been added. Profiles generated by this reporter can be passed to tools such as go tool pprof, or services such as Grafana Pyroscope or Google Cloud's Cloud Profiler.

Changed

  • Pf2::Reporter::FirefoxProfilerSer2 now emits a JSON string, not a Hash. Parse the JSON to obtain the original representaion.

Fixed

  • Fixed a crash when a delayed SIGPROF is received after Pf2.stop is called.

v0.13.0

18 Jan 10:46

Choose a tag to compare

Added

  • Pf2 should now have a dramatically lower memory footprint.
    • Samples are now stored in a compact hashmap internally.
    • See #85 for details.

Fixed

  • pf2 serve command now properly works. (Thanks @hanazuki)

v0.12.0

09 Jan 16:18

Choose a tag to compare

Added

  • Pf2.profile now accepts the same options as Pf2.start.
  • The resulting profile now has collected_sample_count and dropped_sample_count fields.

Fixed

  • Samples captured after the collector thread was stopped now get included in the profile.
    • This shouldn't matter in practice (this all happens after Pf2.stop is called).

Changed

  • Accepted max stack depth is expanded to 1024 for Ruby (was 200) and 512 for native (was 300).
    • This is not configurable, but should be sufficient for most use cases. Please open an issue if you need higher limits.
  • Pf2.profile now accepts the same parameters as Pf2.start.
  • Internal changes
    • Updated libbacktrace to the latest version as of 2026/1/8.
    • Tests are now much more stabilized.

v0.11.3

28 Dec 08:30

Choose a tag to compare

This version is for testing the new release process through Trusted Publishing. All code is identical to 0.11.2.

v0.11.2

28 Dec 05:49

Choose a tag to compare

0.11.1 was yanked since it was accidentally published without libbacktrace vendored. Use 0.11.2.

Fixed

  • Fixed issues preventing builds on macOS.

v0.11.0

27 Dec 11:55

Choose a tag to compare

Added

Changed

  • Pf2c module is now completely removed. Pf2c::Session has been merged as Pf2::Session.

Fixed

  • Fixed an bug where the program crashes when a Pf2::Session is GC'd before profiling starts.
  • Fixed an bug where the program crashes when the native stack was more than 200 frames deep.

v0.10.0

25 Dec 18:49

Choose a tag to compare

Note: This release was originally planned as v1.0.0. Plans have changed, and v1.0.0 will be another release.

Added

This version contains a complete rewrite of the profiler!

  • The default sample collection backend has been switched to the new C-based backend.
    • The previous Rust-based backed has been removed. Use v0.9.0 if you need it.
  • macOS / non-Linux platform support!
    • On platforms which lack timer_create(3) such as macOS, Pf2 now fall backs to setitimer(3) based sampling. This mode does not support per-thread CPU time sampling.

Changed

  • logger is now declared as a dependency (Ruby 4.0 compat).

0.9.0

22 Mar 09:23

Choose a tag to compare

Added

  • pf2 annotate command
  • A new sample collection backend implemented in C

Changed

  • Set SA_RESTART flag to reduce EINTRs in profiled code

v0.8.0

22 Mar 09:22

Choose a tag to compare

Added

  • The new serializer (Ser2) is now available in Pf2::Session#start through the use_experimental_serializer option.
    • This serializer is more efficient and has a smaller memory footprint than the default serializer.
    • Ser2 still lacks some features, such as weaving of native stacks.

v0.7.0

02 Jan 16:21

Choose a tag to compare

Changed

  • Prepended frozen_string_literal: true to all Ruby files.
  • Internals
    • Updated rb-sys to 0.9.105.
    • Synced libbacktrace with upstream as of 2024-08-06.
  • Experimental
    • The new serialization format (Ser2) can be emitted via use_experimental_serializer: true. Development is still in its very early stage, and the old format will be the default in this release.