Skip to content

aprof does not work with Java 11 #15

@ashananin

Description

@ashananin

aprof does not work with Java 11

Bumping asm version to 7.1 allows building artifact but aprof-selftest fails with exception:

[INFO] --- maven-antrun-plugin:1.7:run (aprof-selftest) @ agent ---
[INFO] Executing tasks

main:
     [java] 2019-04-08T14:46:55.151+0300: aprof: Loading Aprof 33-SNAPSHOT, Copyright (C) 2002-2017 Devexperts LLC...
     [java] Exception in thread "main" java.lang.reflect.InvocationTargetException
     [java] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
     [java] 	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
     [java] 	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
     [java] Caused by: java.lang.VerifyError
     [java] 	at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
     [java] 	at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:193)
     [java] 	at com.devexperts.aprof.AProfAgent.redefine(AProfAgent.java:211)
     [java] 	at com.devexperts.aprof.AProfAgent.go(AProfAgent.java:124)
     [java] 	at com.devexperts.aprof.AProfAgent.premain(AProfAgent.java:72)
     [java] 	... 6 more
     [java] FATAL ERROR in native method: processing of -javaagent failed

alex@Bubunta:~/aprof$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu118.04ppa1, mixed mode, sharing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions