Closed javabrett closed 6 years ago
At first I thought you weren't using an Oracle JDK, but it actually is trying to parse the settings file. Odd, I haven't seen that before. Maybe the configuration format changed between JVM releases? Or did the temp file creation not work on your machine?
I think I'll try this again on Linux in case there is macos jvm or tooling foo. Does the profiler project have public builds, where? I guess they run jdk8.
I checked and the .jfc
file format seems to have been version-revved for JDK9, there are at least minor schema changes and they are neither forward nor backward compatible. I predict that a different or filtered version of the modified profile config gradle.jfc
is going to be needed for JDK8 and 9.
JDK8:
<configuration version="1.0" name="Profiling" description="Low overhead configuration for profiling, typically around 2 % overhead." provider="Oracle">
JDK9:
<configuration version="2.0" label="Profiling" description="Low overhead configuration for profiling, typically around 2 % overhead." provider="Oracle">
Note version
and addition of label
at least. I don't know yet what other schema changes might be in-effect. Testing log below, on macos but same on Linux with Oracle JDK.
$ ./gradlew -Dorg.gradle.jvmargs="-XX:+UnlockCommercialFeatures -XX:+FlightRecorder" help
$ jcmd
1795 org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.8
$ jcmd 1795 JFR.start settings=src/main/resources/org/gradle/profiler/jfr/gradle.jfc
1795:
Could not parse setting src/main/resources/org/gradle/profiler/jfr/gradle.jfc
$ jcmd 1795 JFR.start settings=/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/jfr/profile.jfc
1795:
Started recording 1. No limit specified, using maxsize=250MB as default.
Use JFR.dump name=1 filename=FILEPATH to copy recording data to file.
Thanks for checking, that's super helpful! I'll add a config file for Java 9.
I made it run on Java 9, though it won't produce flame graphs yet (see https://github.com/gradle/gradle-profiler/issues/77). That API has changed too :/
I noticed that I couldn't self-profile the
gradle-profiler
build (taskhelp
) when running JDK9. JDK8 works fine. I don't know yet whether this is a JDK/platform issue, or something to do with howgradle-profiler
interacts with the profiler/instrumentation.JDK/platform:
Build
gradle-profiler
then run:Output:
Cause in
profile-out/profile.log
:I've not yet been able to capture a
jfc
file or determine any cause. Please advise if any debugging or verbose logging can be added to a run.