Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

import jdk.jfr.EventType;
import jdk.jfr.ValueDescriptor;
import jdk.jfr.internal.util.Utils;
import jdk.jfr.internal.consumer.ObjectContext;
import jdk.jfr.internal.util.ImplicitFields;

/**
* A recorded event.
Expand All @@ -57,7 +57,7 @@ public final class RecordedEvent extends RecordedObject {
* @return stack trace, or {@code null} if doesn't exist for the event
*/
public RecordedStackTrace getStackTrace() {
return getTyped(Utils.FIELD_STACK_TRACE, RecordedStackTrace.class, null);
return getTyped(ImplicitFields.STACK_TRACE, RecordedStackTrace.class, null);
}

/**
Expand All @@ -67,7 +67,7 @@ public RecordedStackTrace getStackTrace() {
* @return thread, or {@code null} if doesn't exist for the event
*/
public RecordedThread getThread() {
return getTyped(Utils.FIELD_EVENT_THREAD, RecordedThread.class, null);
return getTyped(ImplicitFields.EVENT_THREAD, RecordedThread.class, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, 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
Expand Down Expand Up @@ -30,7 +30,7 @@
import jdk.jfr.*;

@Category({ "Java Application", "Statistics" })
public abstract class AbstractBufferStatisticsEvent extends AbstractJDKEvent {
public abstract class AbstractBufferStatisticsEvent extends AbstractPeriodicEvent {

protected AbstractBufferStatisticsEvent(BufferPool bufferPool) {
count = bufferPool.getCount();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2023, 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.events;

import jdk.jfr.internal.RemoveFields;

@RemoveFields({"duration", "eventThread", "stackTrace"})
abstract class AbstractPeriodicEvent extends AbstractJDKEvent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
import jdk.jfr.StackTrace;
import jdk.jfr.Timespan;
import jdk.jfr.Timestamp;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ActiveRecording")
@Label("Flight Recording")
@Category("Flight Recorder")
@StackTrace(false)
@RemoveFields({"duration", "eventThread", "stackTrace"})
public final class ActiveRecordingEvent extends AbstractJDKEvent {

// The order of these fields must be the same as the parameters in
Expand Down Expand Up @@ -79,7 +81,7 @@ public static boolean enabled() {
return false; // Generated
}

public static void commit(long timestamp, long duration, long id, String name,
public static void commit(long timestamp, long id, String name,
String destination, boolean disk, long maxAge, long flushInterval,
long maxSize, long recordingStart, long recordingDuration) {
// Generated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, 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
Expand Down Expand Up @@ -29,12 +29,14 @@
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.StackTrace;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ActiveSetting")
@Label("Recording Setting")
@Category("Flight Recorder")
@StackTrace(false)
@RemoveFields({"duration", "eventThread", "stackTrace"})
public final class ActiveSettingEvent extends AbstractJDKEvent {

// The order of these fields must be the same as the parameters in
Expand All @@ -49,7 +51,7 @@ public final class ActiveSettingEvent extends AbstractJDKEvent {
@Label("Setting Value")
public String value;

public static void commit(long startTime, long duration, long id, String name, String value) {
public static void commit(long startTime, long id, String name, String value) {
// Generated
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, DataDog. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -36,7 +36,7 @@
@Label("CPU Throttling")
@Category({"Operating System", "Processor"})
@Description("Container CPU throttling related information")
public class ContainerCPUThrottlingEvent extends AbstractJDKEvent {
public class ContainerCPUThrottlingEvent extends AbstractPeriodicEvent {
@Label("CPU Elapsed Slices")
@Description("Number of time-slice periods that have elapsed if a CPU quota has been setup for the container")
public long cpuElapsedSlices;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, DataDog. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -36,7 +36,7 @@
@Label("CPU Usage")
@Category({"Operating System", "Processor"})
@Description("Container CPU usage related information")
public class ContainerCPUUsageEvent extends AbstractJDKEvent {
public class ContainerCPUUsageEvent extends AbstractPeriodicEvent {
@Label("CPU Time")
@Description("Aggregate time consumed by all tasks in the container")
@Timespan
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, DataDog. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -37,7 +37,7 @@
@Label("Container Configuration")
@Category({"Operating System"})
@Description("A set of container specific attributes")
public final class ContainerConfigurationEvent extends AbstractJDKEvent {
public final class ContainerConfigurationEvent extends AbstractPeriodicEvent {
@Label("Container Type")
@Description("Container type information")
public String containerType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, DataDog. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -37,7 +37,7 @@
@Label("Container IO Usage")
@Category({"Operating System", "File System"})
@Description("Container IO usage related information")
public class ContainerIOUsageEvent extends AbstractJDKEvent {
public class ContainerIOUsageEvent extends AbstractPeriodicEvent {

@Label("Block IO Request Count")
@Description("Number of block IO requests to the disk that have been issued by the container")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, DataDog. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -36,7 +36,7 @@
@Label("Container Memory Usage")
@Category({"Operating System", "Memory"})
@Description("Container memory usage related information")
public final class ContainerMemoryUsageEvent extends AbstractJDKEvent {
public final class ContainerMemoryUsageEvent extends AbstractPeriodicEvent {
@Label("Memory Fail Count")
@Description("Number of times that user memory requests in the container have exceeded the memory limit")
public long memoryFailCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, 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
Expand Down Expand Up @@ -30,12 +30,14 @@
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Serialization"})
@Label("Deserialization")
@Name("jdk.Deserialization")
@Description("Results of deserialization and ObjectInputFilter checks")
@MirrorEvent(className = "jdk.internal.event.DeserializationEvent")
@RemoveFields("duration")
public final class DeserializationEvent extends AbstractJDKEvent {

@Label("Filter Configured")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -28,12 +28,14 @@
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "JavaErrorThrow")
@Label("Java Error")
@Category("Java Application")
@Description("An object derived from java.lang.Error has been created. OutOfMemoryErrors are ignored")
@RemoveFields("duration")
public final class ErrorThrownEvent extends AbstractJDKEvent {

// The order of these fields must be the same as the parameters in
Expand All @@ -45,7 +47,7 @@ public final class ErrorThrownEvent extends AbstractJDKEvent {
@Label("Class")
public Class<?> thrownClass;

public static void commit(long start, long duration, String message, Class<? extends Error> thrownClass) {
public static void commit(long start, String message, Class<? extends Error> thrownClass) {
// Generated
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -37,7 +37,7 @@
@Category({ "Java Application", "Statistics" })
@Description("Number of objects derived from java.lang.Throwable that have been created")
@StackTrace(false)
public final class ExceptionStatisticsEvent extends AbstractJDKEvent {
public final class ExceptionStatisticsEvent extends AbstractPeriodicEvent {

@Label("Exceptions Created")
public long throwables;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, 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
Expand Down Expand Up @@ -29,12 +29,14 @@
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "JavaExceptionThrow")
@Label("Java Exception")
@Category("Java Application")
@Description("An object derived from java.lang.Exception has been created")
@RemoveFields("duration")
public final class ExceptionThrownEvent extends AbstractJDKEvent {

// The order of these fields must be the same as the parameters in
Expand All @@ -46,7 +48,7 @@ public final class ExceptionThrownEvent extends AbstractJDKEvent {
@Label("Class")
public Class<?> thrownClass;

public static void commit(long start, long duration, String message, Class<? extends Throwable> thrownClass) {
public static void commit(long start, String message, Class<? extends Throwable> thrownClass) {
// Generated
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023, 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
Expand Down Expand Up @@ -34,7 +34,7 @@
@Label("Initial Security Property")
@Name("jdk.InitialSecurityProperty")
@Description("Initial Security Properties")
public final class InitialSecurityPropertyEvent extends AbstractJDKEvent {
public final class InitialSecurityPropertyEvent extends AbstractPeriodicEvent {
@Label("Key")
public String key;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, 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
Expand Down Expand Up @@ -30,12 +30,14 @@
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Operating System"})
@Label("Process Start")
@Name("jdk.ProcessStart")
@Description("Operating system process started")
@MirrorEvent(className = "jdk.internal.event.ProcessStartEvent")
@RemoveFields("duration")
public final class ProcessStartEvent extends AbstractJDKEvent {
@Label("Process Id")
public long pid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, 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
Expand Down Expand Up @@ -27,12 +27,14 @@

import jdk.jfr.*;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Security"})
@Label("Security Property Modification")
@Name("jdk.SecurityPropertyModification")
@Description("Modification of Security property")
@MirrorEvent(className = "jdk.internal.event.SecurityPropertyModificationEvent")
@RemoveFields("duration")
public final class SecurityPropertyModificationEvent extends AbstractJDKEvent {
@Label("Key")
public String key;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2023, 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
Expand Down Expand Up @@ -30,12 +30,14 @@
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Security"})
@Label("Security Provider Instance Request")
@Name("jdk.SecurityProviderService")
@Description("Details of Provider.getInstance(String type, String algorithm) calls")
@MirrorEvent(className = "jdk.internal.event.SecurityProviderServiceEvent")
@RemoveFields("duration")
public final class SecurityProviderServiceEvent extends AbstractJDKEvent {
@Label("Type of Service")
public String type;
Expand Down
Loading