JEP 328 : Flight Recorder open source preview (original) (raw)
Dmitry Samersoff dms at samersoff.net
Sun Apr 22 10:11:37 UTC 2018
- Previous message: JEP 328 : Flight Recorder open source preview
- Next message: Zero fails to build on SPARC again, similar to JDK-8186578
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Markus,
I attached small patch that allows me to compile hotspot with jfr. It includes changes suggested by Erik and few other ones.
It seems to me that something goes wrong with recording of full stack trace on AArch64.
All advices of debugging this issue are much appreciated. What place in JFR code is responsible for stacktrace recording?
These two tests are failing
jdk/jfr/api/consumer/TestRecordedFullStackTrace.java:
jdk/jfr/event/profiling/TestFullStackTrace.java:
with:
java.lang.RuntimeException: Wrong stacktrace depth. Expected:63: expected 63 to equal 3
at jdk.test.lib.Asserts.fail(Asserts.java:594)
at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
at
jdk.jfr.api.consumer.TestRecordedFullStackTrace.checkEvent(TestRecordedFullStackTrace.java:142)
at
jdk.jfr.api.consumer.TestRecordedFullStackTrace.hasValidStackTraces(TestRecordedFullStackTrace.java:109)
at
jdk.jfr.api.consumer.TestRecordedFullStackTrace.assertStackTraces(TestRecordedFullStackTrace.java:91)
at
jdk.jfr.api.consumer.TestRecordedFullStackTrace.main(TestRecordedFullStackTrace.java:70)
-Dmitry
On 04/15/2018 03:34 PM, Dmitry Samersoff wrote:
Hi Markus,
I'm trying to compile the patch but get following errors: Compiling 1616 files for jdk.localedata .../hs/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java:60: error: package jdk.internal.misc is not visible import jdk.internal.misc.Unsafe; ^ (package jdk.internal.misc is declared in module java.base, which does not export it to module jdk.jfr) .../hs/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java:61: error: package jdk.internal.module does not exist import jdk.internal.module.Modules; ^ .../hs/src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java:31: error: package jdk.internal is not visible import jdk.internal.HotSpotIntrinsicCandidate; etc. Any ideas of what could be wrong? -Dmitry On 04/07/2018 01:28 PM, Markus Gronlund wrote: Greetings,
This is a preview of a large part of the source code for JEP 328 : Flight Recorder[1]. Webrev: http://cr.openjdk.java.net/~mgronlun/JEP328FlightRecorder/Preview/webrev/index.html It has been tested on the following platforms: * Linux-x64 * Windows-x64 * MacOSX-x64 We are planning to send out the code for full review in a couple of weeks. At this point, we are preparing changes to move to a single backend, as suggested in the JEP. These will encompass the following: 1. Rename macro INCLUDETRACE to INCLUDEJFR. 2. Remove flag -XX:[+|-]EnableTracing. 3. Cleanup unused elements and attributes by restructuring the trace xml files. 4. Move code under hotspot/share/trace to hotspot/share/jfr/metadata. Thank you Markus and Erik [1] http://openjdk.java.net/jeps/328 PS the patch was generated from the hs repository [2] using change [3] as parent. [2] http://hg.openjdk.java.net/jdk/hs [3] changeset: 49618:947560700a09 user: stefank date: Fri Apr 06 13:55:25 2018 +0200 summary: 8201136: Move GC flags from globals.hpp to GC specific files
-- Dmitry Samersoff http://devnull.samersoff.net * There will come soft rains ... -------------- next part -------------- diff -r 65a624584dda src/java.base/share/classes/module-info.java --- a/src/java.base/share/classes/module-info.java Sun Apr 22 09:25:31 2018 +0000 +++ b/src/java.base/share/classes/module-info.java Sun Apr 22 09:59:02 2018 +0000 @@ -134,6 +134,8 @@ exports com.sun.security.ntlm to java.security.sasl; + exports jdk.internal to + jdk.jfr; exports jdk.internal.jimage to jdk.jlink; exports jdk.internal.jimage.decompressor to @@ -149,16 +151,28 @@ exports jdk.internal.org.objectweb.asm to jdk.jartool, jdk.jlink, + jdk.jfr, jdk.scripting.nashorn, jdk.internal.vm.ci; exports jdk.internal.org.objectweb.asm.tree to + jdk.jfr, jdk.jlink; exports jdk.internal.org.objectweb.asm.util to + jdk.jfr, jdk.scripting.nashorn; exports jdk.internal.org.objectweb.asm.commons to + jdk.jfr, jdk.scripting.nashorn; exports jdk.internal.org.objectweb.asm.signature to jdk.scripting.nashorn; + exports jdk.internal.org.xml.sax to + jdk.jfr; + exports jdk.internal.org.xml.sax.helpers to + jdk.jfr; + exports jdk.internal.util.xml to + jdk.jfr; + exports jdk.internal.util.xml.impl to + jdk.jfr; exports jdk.internal.misc to java.desktop, java.logging, @@ -173,6 +187,7 @@ jdk.compiler, jdk.incubator.httpclient, jdk.jdeps, + jdk.jfr, jdk.jlink, jdk.jshell, jdk.net, @@ -184,6 +199,7 @@ java.instrument, java.management.rmi, jdk.jartool, + jdk.jfr, jdk.jlink; exports jdk.internal.perf to java.management, @@ -312,7 +328,6 @@ exports sun.util.resources to jdk.localedata;
// the service types defined by the APIs in this module
uses java.lang.System.LoggerFinder;
diff -r 65a624584dda src/java.management/share/classes/module-info.java --- a/src/java.management/share/classes/module-info.java Sun Apr 22 09:25:31 2018 +0000 +++ b/src/java.management/share/classes/module-info.java Sun Apr 22 09:59:02 2018 +0000 @@ -64,6 +64,7 @@ exports sun.management.counter.perf to jdk.management.agent; exports sun.management.spi to
jdk.management.jfr, jdk.management, jdk.internal.vm.compiler.management;
diff -r 65a624584dda test/jdk/jdk/jfr/api/consumer/TestRecordedFullStackTrace.java --- a/test/jdk/jdk/jfr/api/consumer/TestRecordedFullStackTrace.java Sun Apr 22 09:25:31 2018 +0000 +++ b/test/jdk/jdk/jfr/api/consumer/TestRecordedFullStackTrace.java Sun Apr 22 09:59:02 2018 +0000 @@ -139,7 +139,7 @@ try { stacktrace = event.getStackTrace(); List frames = stacktrace.getFrames();
Asserts.assertEquals(Math.min(MAX_DEPTH, expectedDepth), frames.size(), "Wrong stacktrace depth. Expected:" + expectedDepth);
// DMS: tmp Asserts.assertEquals(Math.min(MAX_DEPTH, expectedDepth), frames.size(), "Wrong stacktrace depth. Expected:" + expectedDepth); List<String> expectedMethods = getExpectedMethods(expectedDepth); Asserts.assertEquals(expectedMethods.size(), frames.size(), "Wrong expectedMethods depth. Test error.");
diff -r 65a624584dda test/jdk/jdk/jfr/event/os/TestCPUInformation.java --- a/test/jdk/jdk/jfr/event/os/TestCPUInformation.java Sun Apr 22 09:25:31 2018 +0000 +++ b/test/jdk/jdk/jfr/event/os/TestCPUInformation.java Sun Apr 22 09:59:02 2018 +0000 @@ -54,7 +54,9 @@ Events.assertField(event, "cores").atLeast(1); Events.assertField(event, "sockets").atLeast(1); Events.assertField(event, "cpu").containsAny("Intel", "AMD", "Unknown x86", "sparc", "ARM", "PPC", "PowerPC", "AArch64");
Events.assertField(event, "description").containsAny("Intel", "AMD", "Unknown x86", "SPARC", "ARM", "PPC", "PowerPC", "AArch64");
+// DMS: Line below is incorrect. +// Description line for AArch64 looks like '0x43:0x1:0x0a1:1, simd, crc, aes, sha1, sha256, lse' +// Events.assertField(event, "description").containsAny("Intel", "AMD", "Unknown x86", "SPARC", "ARM", "PPC", "PowerPC", "AArch64"); } } }
- Previous message: JEP 328 : Flight Recorder open source preview
- Next message: Zero fails to build on SPARC again, similar to JDK-8186578
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]