# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               github 1.0
PortGroup               java 1.0
PortGroup               makefile 1.0

github.setup            async-profiler async-profiler 4.0 v
github.tarball_from     archive
revision                0

checksums               rmd160  45825ca6e9599dce922ac0086fd6c4efaba4a260 \
                        sha256  7beb736868af485d6b0b624e42141f78df0ca8403188adc17965b7153261aa55 \
                        size    2139146

categories              java
platforms               macosx
supported_archs         arm64 x86_64
license                 Apache-2
maintainers             nomaintainer

description             Low overhead sampling profiler for Java
long_description        The profiler works with OpenJDK and other Java runtimes based on the HotSpot JVM. \
                        It features HotSpot-specific API to collect stack traces and to track memory allocations. \
                        Unlike traditional Java profilers, async-profiler monitors non-Java threads (e.g., GC and JIT compiler threads) \
                        and shows native and kernel frames in stack traces.

java.version            11+
java.fallback           openjdk11

patchfiles-append       patch-Makefile.diff

compiler.cxx_standard   2011

destroot {
    xinstall -m 755 ${worksrcpath}/build/bin/asprof ${destroot}${prefix}/bin/
    xinstall -m 755 ${worksrcpath}/build/bin/jfrconv ${destroot}${prefix}/bin/
    xinstall -m 755 ${worksrcpath}/build/lib/libasyncProfiler.dylib ${destroot}${prefix}/lib/
}
