--- a/src/hotspot/share/jfr/metadata/metadata.xml Thu Sep 12 11:32:03 2019 -0700
+++ b/src/hotspot/share/jfr/metadata/metadata.xml Thu Sep 12 20:45:23 2019 -0700
@@ -154,7 +154,7 @@
<Field type="string" name="newValue" label="New Value" />
<Field type="FlagValueOrigin" name="origin" label="Origin" />
</Event>
-
+
<Type name="VirtualSpace">
<Field type="ulong" contentType="address" name="start" label="Start Address" description="Start address of the virtual space" />
<Field type="ulong" contentType="address" name="committedEnd" label="Committed End Address" description="End address of the committed memory for the virtual space" />
@@ -162,27 +162,27 @@
<Field type="ulong" contentType="address" name="reservedEnd" label="Reserved End Address" description="End address of the reserved memory for the virtual space" />
<Field type="ulong" contentType="bytes" name="reservedSize" label="Reserved Size" description="Size of the reserved memory for the virtual space" />
</Type>
-
+
<Type name="ObjectSpace">
<Field type="ulong" contentType="address" name="start" label="Start Address" description="Start address of the space" />
<Field type="ulong" contentType="address" name="end" label="End Address" description="End address of the space" />
<Field type="ulong" contentType="bytes" name="used" label="Used" description="Bytes allocated by objects in the space" />
<Field type="ulong" contentType="bytes" name="size" label="Size" description="Size of the space" />
</Type>
-
+
<Event name="GCHeapSummary" category="Java Virtual Machine, GC, Heap" label="Heap Summary" startTime="false">
<Field type="uint" name="gcId" label="GC Identifier" relation="GcId" />
<Field type="GCWhen" name="when" label="When" />
<Field type="VirtualSpace" struct="true" name="heapSpace" label="Heap Space" />
<Field type="ulong" contentType="bytes" name="heapUsed" label="Heap Used" description="Bytes allocated by objects in the heap" />
</Event>
-
+
<Type name="MetaspaceSizes">
<Field type="ulong" contentType="bytes" name="committed" label="Committed" description="Committed memory for this space" />
<Field type="ulong" contentType="bytes" name="used" label="Used" description="Bytes allocated by objects in the space" />
<Field type="ulong" contentType="bytes" name="reserved" label="Reserved" description="Reserved memory for this space" />
</Type>
-
+
<Event name="MetaspaceSummary" category="Java Virtual Machine, GC, Heap" label="Metaspace Summary" startTime="false">
<Field type="uint" name="gcId" label="GC Identifier" relation="GcId" />
<Field type="GCWhen" name="when" label="When" />
@@ -442,7 +442,7 @@
<Field type="uint" name="gcWorkerId" label="GC Worker Identifier" />
<Field type="string" name="name" label="Name" />
</Event>
-
+
<Event name="AllocationRequiringGC" category="Java Virtual Machine, GC, Detailed" label="Allocation Requiring GC" thread="true" stackTrace="true"
startTime="false">
<Field type="uint" name="gcId" label="Pending GC Identifier" relation="GcId" />
@@ -484,7 +484,7 @@
<Field type="string" name="failureMessage" label="Failure Message" />
<Field type="uint" name="compileId" label="Compilation Identifier" relation="CompileId" />
</Event>
-
+
<Type name="CalleeMethod">
<Field type="string" name="type" label="Class" />
<Field type="string" name="name" label="Method Name" />
@@ -585,21 +585,21 @@
<Field type="OldObjectGcRoot" name="root" label="GC Root" />
</Event>
- <Event name="DumpReason" category="Flight Recorder" label="Recording Reason"
- description="Who requested the recording and why"
+ <Event name="DumpReason" category="Flight Recorder" label="Recording Reason"
+ description="Who requested the recording and why"
startTime="false">
<Field type="string" name="reason" label="Reason" description="Reason for writing recording data to disk" />
<Field type="int" name="recordingId" label="Recording Id" description="Id of the recording that triggered the dump, or -1 if it was not related to a recording" />
</Event>
- <Event name="DataLoss" category="Flight Recorder" label="Data Loss"
+ <Event name="DataLoss" category="Flight Recorder" label="Data Loss"
description="Data could not be copied out from a buffer, typically because of contention"
startTime="false">
<Field type="ulong" contentType="bytes" name="amount" label="Amount" description="Amount lost data" />
<Field type="ulong" contentType="bytes" name="total" label="Total" description="Total lost amount for thread" />
</Event>
- <Event name="JVMInformation" category="Java Virtual Machine" label="JVM Information"
+ <Event name="JVMInformation" category="Java Virtual Machine" label="JVM Information"
description="Description of JVM and the Java application"
period="endChunk">
<Field type="string" name="jvmName" label="JVM Name" />
@@ -1202,36 +1202,36 @@
<Type name="ChunkHeader" label="Chunk Header">
<Field type="byte" array="true" name="payload" label="Payload" />
</Type>
-
+
<Relation name="JavaMonitorAddress"/>
<Relation name="SafepointId"/>
<Relation name="GcId"/>
<Relation name="CompileId" />
<Relation name="SweepId"/>
<Relation name="FlushId"/>
-
- <XmlType name="Package" parameterType="const PackageEntry*" fieldType="const PackageEntry*"/>
- <XmlType name="Class" javaType="java.lang.Class" parameterType="const Klass*" fieldType="const Klass*"/>
- <XmlType name="Module" parameterType="const ModuleEntry*" fieldType="const ModuleEntry*"/>
- <XmlType name="ClassLoader" parameterType="const ClassLoaderData*" fieldType="const ClassLoaderData*"/>
- <XmlType name="Method" parameterType="const Method*" fieldType="const Method*"/>
- <XmlType name="Thread" javaType="java.lang.Thread" parameterType="u8" fieldType="u8"/>
- <XmlType name="Tickspan" contentType="tickspan" javaType="long" parameterType="const Tickspan&" fieldType="Tickspan"/>
- <XmlType name="Ticks" contentType="tickstamp" javaType="long" parameterType="const Ticks&" fieldType="Ticks"/>
- <XmlType name="ulong" javaType="long" unsigned="true" parameterType="u8" fieldType="u8"/>
- <XmlType name="uint" javaType="int" unsigned="true" parameterType="unsigned" fieldType="unsigned"/>
- <XmlType name="ushort" javaType="short" unsigned="true" parameterType="u2" fieldType="u2"/>
- <XmlType name="ubyte" javaType="byte" unsigned="true" parameterType="u1" fieldType="u1"/>
- <XmlType name="long" javaType="long" parameterType="s8" fieldType="s8"/>
- <XmlType name="int" javaType="int" parameterType="s4" fieldType="s4"/>
- <XmlType name="short" javaType="short" parameterType="s2" fieldType="s2"/>
- <XmlType name="byte" javaType="byte" parameterType="s1" fieldType="s1"/>
- <XmlType name="double" javaType="double" parameterType="double" fieldType="double"/>
- <XmlType name="float" javaType="float" parameterType="float" fieldType="float"/>
- <XmlType name="boolean" javaType="boolean" parameterType="bool" fieldType="bool"/>
- <XmlType name="char" javaType="char" parameterType="char" fieldType="char"/>
- <XmlType name="string" javaType="java.lang.String" parameterType="const char*" fieldType="const char*"/>
-
+
+ <XmlType name="Package" parameterType="const PackageEntry*" fieldType="const PackageEntry*"/>
+ <XmlType name="Class" javaType="java.lang.Class" parameterType="const Klass*" fieldType="const Klass*"/>
+ <XmlType name="Module" parameterType="const ModuleEntry*" fieldType="const ModuleEntry*"/>
+ <XmlType name="ClassLoader" parameterType="const ClassLoaderData*" fieldType="const ClassLoaderData*"/>
+ <XmlType name="Method" parameterType="const Method*" fieldType="const Method*"/>
+ <XmlType name="Thread" javaType="java.lang.Thread" parameterType="u8" fieldType="u8"/>
+ <XmlType name="Tickspan" contentType="tickspan" javaType="long" parameterType="const Tickspan&" fieldType="Tickspan"/>
+ <XmlType name="Ticks" contentType="tickstamp" javaType="long" parameterType="const Ticks&" fieldType="Ticks"/>
+ <XmlType name="ulong" javaType="long" unsigned="true" parameterType="u8" fieldType="u8"/>
+ <XmlType name="uint" javaType="int" unsigned="true" parameterType="unsigned" fieldType="unsigned"/>
+ <XmlType name="ushort" javaType="short" unsigned="true" parameterType="u2" fieldType="u2"/>
+ <XmlType name="ubyte" javaType="byte" unsigned="true" parameterType="u1" fieldType="u1"/>
+ <XmlType name="long" javaType="long" parameterType="s8" fieldType="s8"/>
+ <XmlType name="int" javaType="int" parameterType="s4" fieldType="s4"/>
+ <XmlType name="short" javaType="short" parameterType="s2" fieldType="s2"/>
+ <XmlType name="byte" javaType="byte" parameterType="s1" fieldType="s1"/>
+ <XmlType name="double" javaType="double" parameterType="double" fieldType="double"/>
+ <XmlType name="float" javaType="float" parameterType="float" fieldType="float"/>
+ <XmlType name="boolean" javaType="boolean" parameterType="bool" fieldType="bool"/>
+ <XmlType name="char" javaType="char" parameterType="char" fieldType="char"/>
+ <XmlType name="string" javaType="java.lang.String" parameterType="const char*" fieldType="const char*"/>
+
<XmlContentType name="bytes" annotation="jdk.jfr.DataAmount(BYTES)" />
<XmlContentType name="tickstamp" annotation="jdk.jfr.Timestamp(TICKS)" />
<XmlContentType name="epochmillis" annotation="jdk.jfr.Timestamp(MILLISECONDS_SINCE_EPOCH)" />
@@ -1243,5 +1243,5 @@
<XmlContentType name="hertz" annotation="jdk.jfr.Frequency" />
<XmlContentType name="bytes-per-second" annotation="jdk.jfr.DataAmount(BYTES), jdk.jfr.Frequency" />
<XmlContentType name="bits-per-second" annotation="jdk.jfr.DataAmount(BITS), jdk.jfr.Frequency" />
-
+
</Metadata>
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/FilePurger.java Thu Sep 12 11:32:03 2019 -0700
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/FilePurger.java Thu Sep 12 20:45:23 2019 -0700
@@ -1,47 +1,73 @@
-package jdk.jfr.internal;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import jdk.jfr.internal.SecuritySupport.SafePath;
-
-// This class keeps track of files that can't be deleted
-// so they can a later staged be removed.
-final class FilePurger {
-
- private final static Set<SafePath> paths = new LinkedHashSet<>();
-
- public synchronized static void add(SafePath p) {
- paths.add(p);
- if (paths.size() > 1000) {
- removeOldest();
- }
- }
-
- public synchronized static void purge() {
- if (paths.isEmpty()) {
- return;
- }
-
- for (SafePath p : new ArrayList<>(paths)) {
- if (delete(p)) {
- paths.remove(p);
- }
- }
- }
-
- private static void removeOldest() {
- SafePath oldest = paths.iterator().next();
- paths.remove(oldest);
- }
-
- private static boolean delete(SafePath p) {
- try {
- SecuritySupport.delete(p);
- return true;
- } catch (IOException e) {
- return false;
- }
- }
-}
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.jfr.internal;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import jdk.jfr.internal.SecuritySupport.SafePath;
+
+// This class keeps track of files that can't be deleted
+// so they can a later staged be removed.
+final class FilePurger {
+
+ private final static Set<SafePath> paths = new LinkedHashSet<>();
+
+ public synchronized static void add(SafePath p) {
+ paths.add(p);
+ if (paths.size() > 1000) {
+ removeOldest();
+ }
+ }
+
+ public synchronized static void purge() {
+ if (paths.isEmpty()) {
+ return;
+ }
+
+ for (SafePath p : new ArrayList<>(paths)) {
+ if (delete(p)) {
+ paths.remove(p);
+ }
+ }
+ }
+
+ private static void removeOldest() {
+ SafePath oldest = paths.iterator().next();
+ paths.remove(oldest);
+ }
+
+ private static boolean delete(SafePath p) {
+ try {
+ SecuritySupport.delete(p);
+ return true;
+ } catch (IOException e) {
+ return false;
+ }
+ }
+}
--- a/src/jdk.jfr/share/conf/jfr/default.jfc Thu Sep 12 11:32:03 2019 -0700
+++ b/src/jdk.jfr/share/conf/jfr/default.jfc Thu Sep 12 20:45:23 2019 -0700
@@ -406,7 +406,7 @@
<setting name="enabled" control="gc-enabled-normal">true</setting>
<setting name="threshold">0 ms</setting>
</event>
-
+
<event name="jdk.G1BasicIHOP">
<setting name="enabled" control="gc-enabled-normal">true</setting>
</event>
--- a/src/jdk.jfr/share/conf/jfr/profile.jfc Thu Sep 12 11:32:03 2019 -0700
+++ b/src/jdk.jfr/share/conf/jfr/profile.jfc Thu Sep 12 20:45:23 2019 -0700
@@ -406,7 +406,7 @@
<setting name="enabled" control="gc-enabled-normal">true</setting>
<setting name="threshold">0 ms</setting>
</event>
-
+
<event name="jdk.G1BasicIHOP">
<setting name="enabled" control="gc-enabled-normal">true</setting>
</event>
--- a/test/jdk/jdk/jfr/jvm/TestThreadExclusion.java Thu Sep 12 11:32:03 2019 -0700
+++ b/test/jdk/jdk/jfr/jvm/TestThreadExclusion.java Thu Sep 12 20:45:23 2019 -0700
@@ -95,7 +95,7 @@
}
return threads;
}
-
+
private static long[] getJavaThreadIds(LatchedThread[] threads) {
long[] javaThreadIds = new long[threads.length];
for (int i = 0; i < threads.length; ++i) {