这是indexloc提供的服务,不要输入任何密码
Skip to content

Binary launcher #724

@apangin

Description

@apangin

Background

async-profiler currently includes the following components:

  • libasyncProfiler.so - profiler engine that works in the context of Java process;
  • jattach - utility to inject the profiler engine into the target JVM;
  • fdtransfer - helper for profiling containerized applications;
  • profiler.sh - profiler command-line interface written in shell script.

The package has non-standard structure: with binaries in the build folder and CLI together with the documentation in the root folder.

Proposal

  1. Reshape the package to a more conventional structure:
    • /bin directory with the profiler launcher;
    • /lib with libasyncProfiler.so.
  2. Make the launcher a binary executable asprof instead of profiler.sh.
  3. Incorporate the functionality of jattach and fdtransfer in the launcher, so the package contains no other executables besides asprof.

Motivation

  1. Intuitive usage.
  2. Simpler deployment / integration.
  3. Less typing.
  4. Preparation for building packages in commonly used formats: RPM, DEB, etc.
  5. More flexibility, e.g., the binary launcher may in future switch between host and container namespaces to provide seamless user experience: automatically copy the profiler library into the container and get the output from the container.
  6. The same statically linked executable may work both with glibc and musl.

Non-goals

  1. There is no intention to change existing command line syntax, except for minor nuances.

Target release

async-profiler 3.x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions