Skip to content

Commit

Permalink
Release 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
apangin committed Oct 1, 2021
1 parent 7eb15cf commit edbb9e7
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 22 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## [2.5] - 2021-10-01

### Features
- macOS/ARM64 (aka Apple M1) port
- PPC64LE port (contributed by @ghaug)
- Profile low-privileged processes with perf_events (contributed by @Jongy)
- Raw PMU events; kprobes & uprobes
- Dump results in the middle of profiling session
- Chunked JFR; support JFR files larger than 2 GB
- Integrate async-profiler events with JDK Flight Recordings

### Improvements
- Use RDTSC for JFR timestamps when possible
- Show line numbers and bci in Flame Graphs
- jfr2flame can produce Allocation and Lock flame graphs
- Flame Graph title depends on the event and `--total`
- Include profiler logs and native library list in JFR output
- Lock profiling no longer requires JVM symbols
- Better container support
- Native function profiler can count the specified argument
- An option to group threads by scheduling policy
- An option to prepend library name to native symbols

### Notes
- macOS build is provided as a fat binary that works both on x86-64 and ARM64
- 32-bit binaries are no longer shipped. It is still possible to build them from sources
- Dropped JDK 6 support (may still work though)

## [2.0] - 2021-03-14

### Features
Expand Down
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROFILER_VERSION=2.1-ea
PROFILER_VERSION=2.5

PACKAGE_NAME=async-profiler-$(PROFILER_VERSION)-$(OS_TAG)-$(ARCH_TAG)
PACKAGE_DIR=/tmp/$(PACKAGE_NAME)
Expand Down Expand Up @@ -29,24 +29,30 @@ ifeq ($(JAVA_HOME),)
endif

OS:=$(shell uname -s)
ifeq ($(OS), Darwin)
ifeq ($(OS),Darwin)
CXXFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
INCLUDES += -I$(JAVA_HOME)/include/darwin
FDTRANSFER_BIN=
SOEXT=dylib
PACKAGE_EXT=zip
OS_TAG=macos
FDTRANSFER_BIN=
ifeq ($(FAT_BINARY),true)
FAT_BINARY_FLAGS=-arch x86_64 -arch arm64 -mmacos-version-min=10.12
CFLAGS += $(FAT_BINARY_FLAGS)
CXXFLAGS += $(FAT_BINARY_FLAGS)
PACKAGE_NAME=async-profiler-$(PROFILER_VERSION)-$(OS_TAG)
endif
else
LIBS += -lrt
INCLUDES += -I$(JAVA_HOME)/include/linux
FDTRANSFER_BIN=build/fdtransfer
SOEXT=so
PACKAGE_EXT=tar.gz
ifeq ($(findstring musl,$(shell ldd /bin/ls)),musl)
OS_TAG=linux-musl
else
OS_TAG=linux
endif
FDTRANSFER_BIN=build/fdtransfer
endif

ARCH:=$(shell uname -m)
Expand All @@ -55,13 +61,13 @@ ifeq ($(ARCH),x86_64)
else
ifeq ($(findstring arm,$(ARCH)),arm)
ifeq ($(findstring 64,$(ARCH)),64)
ARCH_TAG=aarch64
ARCH_TAG=arm64
else
ARCH_TAG=arm
ARCH_TAG=arm32
endif
else
ifeq ($(findstring aarch64,$(ARCH)),aarch64)
ARCH_TAG=aarch64
ARCH_TAG=arm64
else
ifeq ($(ARCH),ppc64le)
ARCH_TAG=ppc64le
Expand Down Expand Up @@ -92,7 +98,7 @@ $(PACKAGE_NAME).zip: $(PACKAGE_DIR)
ditto -c -k --keepParent $(PACKAGE_DIR) $@
rm -r $(PACKAGE_DIR)

$(PACKAGE_DIR): build/$(LIB_PROFILER) build/$(JATTACH) \
$(PACKAGE_DIR): build/$(LIB_PROFILER) build/$(JATTACH) $(FDTRANSFER_BIN) \
build/$(API_JAR) build/$(CONVERTER_JAR) \
profiler.sh LICENSE *.md
mkdir -p $(PACKAGE_DIR)
Expand Down
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ to learn about all features.

## Download

Current release (2.0):

- Linux x64 (glibc): [async-profiler-2.0-linux-x64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-linux-x64.tar.gz)
- Linux x86 (glibc): [async-profiler-2.0-linux-x86.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-linux-x86.tar.gz)
- Linux x64 (musl): [async-profiler-2.0-linux-musl-x64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-linux-musl-x64.tar.gz)
- Linux ARM: [async-profiler-2.0-linux-arm.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-linux-arm.tar.gz)
- Linux AArch64: [async-profiler-2.0-linux-aarch64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-linux-aarch64.tar.gz)
- macOS x64: [async-profiler-2.0-macos-x64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/async-profiler-2.0-macos-x64.tar.gz)
Current release (2.5):

- Linux x64 (glibc): [async-profiler-2.5-linux-x64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/async-profiler-2.5-linux-x64.tar.gz)
- Linux x64 (musl): [async-profiler-2.5-linux-musl-x64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/async-profiler-2.5-linux-musl-x64.tar.gz)
- Linux arm64: [async-profiler-2.5-linux-arm64.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/async-profiler-2.5-linux-arm64.tar.gz)
- macOS x64/arm64: [async-profiler-2.5-macos.tar.gz](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/async-profiler-2.5-macos.tar.gz)
 
- Converters between profile formats: [converter.jar](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.0/converter.jar)
- Converters between profile formats: [converter.jar](https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.5/converter.jar)
(JFR to Flame Graph, JFR to FlameScope, collapsed stacks to Flame Graph)

[Previous releases](https://github.com/jvm-profiling-tools/async-profiler/releases)
Expand All @@ -37,8 +35,8 @@ For more information refer to [IntelliJ IDEA documentation](https://www.jetbrain

## Supported platforms

- **Linux** / x64 / x86 / ARM / AArch64
- **macOS** / x64 / AArch64 (Apple M1)
- **Linux** / x64 / x86 / arm64 / arm32 / ppc64le
- **macOS** / x64 / arm64

### Community supported builds

Expand Down Expand Up @@ -156,7 +154,7 @@ use hardware breakpoint event instead, e.g. `-e Java_java_lang_Throwable_fillInS

## Building

Build status: [![Build Status](https://travis-ci.org/jvm-profiling-tools/async-profiler.svg?branch=master)](https://travis-ci.org/jvm-profiling-tools/async-profiler)
Build status: [![Build Status](https://github.com/jvm-profiling-tools/async-profiler/actions/workflows/cpp.yml/badge.svg?branch=master)](https://github.com/jvm-profiling-tools/async-profiler/actions/workflows/cpp.yml)

Make sure the `JAVA_HOME` environment variable points to your JDK installation,
and then run `make`. GCC is required. After building, the profiler agent binary
Expand Down Expand Up @@ -242,7 +240,7 @@ $ java -agentpath:/path/to/libasyncProfiler.so=start,event=cpu,file=profile.html

Agent library is configured through the JVMTI argument interface.
The format of the arguments string is described
[in the source code](https://github.com/jvm-profiling-tools/async-profiler/blob/v2.0/src/arguments.cpp#L44).
[in the source code](https://github.com/jvm-profiling-tools/async-profiler/blob/v2.5/src/arguments.cpp#L50).
The `profiler.sh` script actually converts command line arguments to that format.

For instance, `-e wall` is converted to `event=wall`, `-f profile.html`
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>tools.profiler</groupId>
<artifactId>async-profiler</artifactId>
<version>2.0</version>
<version>2.5</version>
<packaging>jar</packaging>

<name>async-profiler</name>
Expand Down

0 comments on commit edbb9e7

Please sign in to comment.