Package io.perfmark

PerfMark is a very low overhead tracing library, designed for in-process use. To use PerfMark, see the docs on PerfMark.

The PerfMark project is split into several, cohesive pieces, that allow users to selectively include what they need. For users that want to add the tracing hooks into their application, but not include the full implementation, only the io.perfmark package is needed. For consuming the data, the io.perfmark.tracewriter package can be used to write to the Chrome Trace Event format.

PerfMark includes several runtime-only dependencies that can be included for fast recording. The library will attempt to load these packages if they are found on the classpath, falling back if they are unavailable. To work properly, a generator and a recorder are needed. Generators tell PerfMark if it is enabled or not. Recorders tell PerfMark how to store the data, if it is enabled. The stable implementations are:

  • io.perfmark.java9
    - a wait-free recorder and low-overhead generator. The recorder in this package has the lowest and most consistent amount of overhead. The generator in this package is not the fastest, but has low overhead to enable / disable.
  • io.perfmark.java7
    - a zero-overhead generator. The generator here is more efficient than the one in the
    io.perfmark.java9
    package, but has a high overhead to enable / disable it.
  • io.perfmark.java6
    - a blocking recorder and medium-overhead generator. This package is included as a safe fallback for when advanced VM features are unavailable, or when running on Android.

The overhead of tracing is very low in all implementations, and has been custom tailored for no-allocation. See the documentation in README.md in the root directory for more info.

See Also:
PerfMark.io, https://github.com/perfmark