Skip to content

Commit 07facd0

Browse files
committed
8330734: JFR: Re-engineer mirror class mechanism
Reviewed-by: mgronlun
1 parent 0bf516f commit 07facd0

26 files changed

+127
-159
lines changed

src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -36,9 +36,8 @@
3636
@Label("Deserialization")
3737
@Name("jdk.Deserialization")
3838
@Description("Results of deserialization and ObjectInputFilter checks")
39-
@MirrorEvent(className = "jdk.internal.event.DeserializationEvent")
4039
@RemoveFields("duration")
41-
public final class DeserializationEvent extends AbstractJDKEvent {
40+
public final class DeserializationEvent extends MirrorEvent {
4241

4342
@Label("Filter Configured")
4443
public boolean filterConfigured;

src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -36,9 +36,8 @@
3636
@Label("Java Error")
3737
@Category("Java Application")
3838
@Description("An object derived from java.lang.Error has been created. OutOfMemoryErrors are ignored")
39-
@MirrorEvent(className = "jdk.internal.event.ErrorThrownEvent")
4039
@RemoveFields("duration")
41-
public final class ErrorThrownEvent extends AbstractJDKEvent {
40+
public final class ErrorThrownEvent extends MirrorEvent {
4241

4342
@Label("Message")
4443
public String message;

src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
import jdk.jfr.Name;
3232
import jdk.jfr.StackTrace;
3333
import jdk.jfr.internal.MirrorEvent;
34+
import jdk.jfr.internal.RemoveFields;
3435
import jdk.jfr.internal.Type;
3536

3637
@Name(Type.EVENT_NAME_PREFIX + "ExceptionStatistics")
3738
@Label("Exception Statistics")
3839
@Category({ "Java Application", "Statistics" })
3940
@Description("Number of objects derived from java.lang.Throwable that have been created")
40-
@MirrorEvent(className = "jdk.internal.event.ExceptionStatisticsEvent")
41-
public final class ExceptionStatisticsEvent extends AbstractPeriodicEvent {
41+
@RemoveFields({"duration", "eventThread", "stackTrace"})
42+
public final class ExceptionStatisticsEvent extends MirrorEvent {
4243

4344
@Label("Exceptions Created")
4445
public long throwables;

src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,9 +37,8 @@
3737
@Label("Java Exception")
3838
@Category("Java Application")
3939
@Description("An object derived from java.lang.Exception has been created")
40-
@MirrorEvent(className = "jdk.internal.event.ExceptionThrownEvent")
4140
@RemoveFields("duration")
42-
public final class ExceptionThrownEvent extends AbstractJDKEvent {
41+
public final class ExceptionThrownEvent extends MirrorEvent {
4342

4443
@Label("Message")
4544
public String message;

src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -36,10 +36,9 @@
3636
@Label("Process Start")
3737
@Name("jdk.ProcessStart")
3838
@Description("Operating system process started")
39-
@MirrorEvent(className = "jdk.internal.event.ProcessStartEvent")
4039
@RemoveFields("duration")
4140
@StackFilter({"java.lang.ProcessBuilder", "java.lang.Runtime::exec"})
42-
public final class ProcessStartEvent extends AbstractJDKEvent {
41+
public final class ProcessStartEvent extends MirrorEvent {
4342
@Label("Process Id")
4443
public long pid;
4544

src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -33,10 +33,9 @@
3333
@Label("Security Property Modification")
3434
@Name("jdk.SecurityPropertyModification")
3535
@Description("Modification of Security property")
36-
@MirrorEvent(className = "jdk.internal.event.SecurityPropertyModificationEvent")
3736
@RemoveFields("duration")
3837
@StackFilter({"java.security.Security::setProperty"})
39-
public final class SecurityPropertyModificationEvent extends AbstractJDKEvent {
38+
public final class SecurityPropertyModificationEvent extends MirrorEvent {
4039
@Label("Key")
4140
public String key;
4241

src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -36,10 +36,9 @@
3636
@Label("Security Provider Instance Request")
3737
@Name("jdk.SecurityProviderService")
3838
@Description("Details of Provider.getInstance(String type, String algorithm) calls")
39-
@MirrorEvent(className = "jdk.internal.event.SecurityProviderServiceEvent")
4039
@RemoveFields("duration")
4140
@StackFilter({"java.security.Provider::getService"})
42-
public final class SecurityProviderServiceEvent extends AbstractJDKEvent {
41+
public final class SecurityProviderServiceEvent extends MirrorEvent {
4342
@Label("Type of Service")
4443
public String type;
4544

src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -40,9 +40,8 @@
4040
" The checks are usually performed just once per serializable class," +
4141
" the first time it is used by serialization." +
4242
" Under high memory pressure, a class might be re-checked again.")
43-
@MirrorEvent(className = "jdk.internal.event.SerializationMisdeclarationEvent")
4443
@RemoveFields({"duration", "stackTrace", "eventThread"})
45-
public final class SerializationMisdeclarationEvent extends AbstractJDKEvent {
44+
public final class SerializationMisdeclarationEvent extends MirrorEvent {
4645

4746
@Label("Misdeclared Class")
4847
public Class<?> misdeclaredClass;

src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,7 @@
3838
@Label("Socket Read")
3939
@Category("Java Application")
4040
@Description("Reading data from a socket")
41-
@MirrorEvent(className = "jdk.internal.event.SocketReadEvent")
42-
public final class SocketReadEvent extends AbstractJDKEvent {
41+
public final class SocketReadEvent extends MirrorEvent {
4342

4443
@Label("Remote Host")
4544
public String host;

src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,8 +37,7 @@
3737
@Label("Socket Write")
3838
@Category("Java Application")
3939
@Description("Writing data to a socket")
40-
@MirrorEvent(className = "jdk.internal.event.SocketWriteEvent")
41-
public final class SocketWriteEvent extends AbstractJDKEvent {
40+
public final class SocketWriteEvent extends MirrorEvent {
4241

4342
@Label("Remote Host")
4443
public String host;

0 commit comments

Comments
 (0)