mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8275338: Add JFR events for notable serialization situations
Reviewed-by: rriggs, egahlin
This commit is contained in:
parent
4c1a0fc58f
commit
bfd2afe5ad
10 changed files with 781 additions and 0 deletions
|
@ -55,6 +55,8 @@ import java.util.HashSet;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import jdk.internal.event.SerializationMisdeclarationEvent;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
@ -459,6 +461,10 @@ public final class ObjectStreamClass implements Serializable {
|
|||
}
|
||||
}
|
||||
initialized = true;
|
||||
|
||||
if (SerializationMisdeclarationEvent.enabled() && serializable) {
|
||||
SerializationMisdeclarationChecker.checkMisdeclarations(cl);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue