Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 jdk.jfr.jmod - JFR Module
JDK 17 jdk.jfr.jmod is the JMOD file for JDK 17 JFR module.
JDK 17 JFR module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jfr.jmod.
JDK 17 JFR module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JFR module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jfr.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jfr/internal/PlatformEventType.java
/* * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.internal; import java.util.ArrayList; import java.util.List; import java.util.Objects; import jdk.jfr.SettingDescriptor; /** * Implementation of event type. * * To avoid memory leaks, this class must not hold strong reference to an event * class or a setting class */ public final class PlatformEventType extends Type { private final boolean isJVM; private final boolean isJDK; private final boolean isMethodSampling; private final List<SettingDescriptor> settings = new ArrayList<>(5); private final boolean dynamicSettings; private final int stackTraceOffset; // default values private boolean largeSize = false; private boolean enabled = false; private boolean stackTraceEnabled = true; private long thresholdTicks = 0; private long period = 0; private boolean hasHook; private boolean beginChunk; private boolean endChunk; private boolean hasStackTrace = true; private boolean hasDuration = true; private boolean hasPeriod = true; private boolean hasCutoff = false; private boolean hasThrottle = false; private boolean isInstrumented; private boolean markForInstrumentation; private boolean registered = true; private boolean committable = enabled && registered; // package private PlatformEventType(String name, long id, boolean isJDK, boolean dynamicSettings) { super(name, Type.SUPER_TYPE_EVENT, id); this.dynamicSettings = dynamicSettings; this.isJVM = Type.isDefinedByJVM(id); this.isMethodSampling = isJVM && (name.equals(Type.EVENT_NAME_PREFIX + "ExecutionSample") || name.equals(Type.EVENT_NAME_PREFIX + "NativeMethodSample")); this.isJDK = isJDK; this.stackTraceOffset = stackTraceOffset(name, isJDK); } private static boolean isExceptionEvent(String name) { switch (name) { case Type.EVENT_NAME_PREFIX + "JavaErrorThrow" : case Type.EVENT_NAME_PREFIX + "JavaExceptionThrow" : return true; } return false; } private static boolean isUsingHandler(String name) { switch (name) { case Type.EVENT_NAME_PREFIX + "SocketRead" : case Type.EVENT_NAME_PREFIX + "SocketWrite" : case Type.EVENT_NAME_PREFIX + "FileRead" : case Type.EVENT_NAME_PREFIX + "FileWrite" : case Type.EVENT_NAME_PREFIX + "FileForce" : return true; } return false; } private static int stackTraceOffset(String name, boolean isJDK) { if (isJDK) { if (isExceptionEvent(name)) { return 4; } if (isUsingHandler(name)) { return 3; } } return 4; } public void add(SettingDescriptor settingDescriptor) { Objects.requireNonNull(settingDescriptor); settings.add(settingDescriptor); } public List<SettingDescriptor> getSettings() { if (dynamicSettings) { List<SettingDescriptor> list = new ArrayList<>(settings.size()); for (SettingDescriptor s : settings) { if (Utils.isSettingVisible(s.getTypeId(), hasHook)) { list.add(s); } } return list; } return settings; } public List<SettingDescriptor> getAllSettings() { return settings; } public void setHasStackTrace(boolean hasStackTrace) { this.hasStackTrace = hasStackTrace; } public void setHasDuration(boolean hasDuration) { this.hasDuration = hasDuration; } public void setHasCutoff(boolean hasCutoff) { this.hasCutoff = hasCutoff; } public void setHasThrottle(boolean hasThrottle) { this.hasThrottle = hasThrottle; } public void setCutoff(long cutoffNanos) { if (isJVM) { long cutoffTicks = Utils.nanosToTicks(cutoffNanos); JVM.getJVM().setCutoff(getId(), cutoffTicks); } } public void setThrottle(long eventSampleSize, long period_ms) { if (isJVM) { JVM.getJVM().setThrottle(getId(), eventSampleSize, period_ms); } } public void setHasPeriod(boolean hasPeriod) { this.hasPeriod = hasPeriod; } public boolean hasStackTrace() { return this.hasStackTrace; } public boolean hasDuration() { return this.hasDuration; } public boolean hasPeriod() { return this.hasPeriod; } public boolean hasCutoff() { return this.hasCutoff; } public boolean hasThrottle() { return this.hasThrottle; } public boolean isEnabled() { return enabled; } public boolean isSystem() { return isJVM || isJDK; } public boolean isJVM() { return isJVM; } public boolean isJDK() { return isJDK; } public void setEnabled(boolean enabled) { this.enabled = enabled; updateCommittable(); if (isJVM) { if (isMethodSampling) { long p = enabled ? period : 0; JVM.getJVM().setMethodSamplingInterval(getId(), p); } else { JVM.getJVM().setEnabled(getId(), enabled); } } } public void setPeriod(long periodMillis, boolean beginChunk, boolean endChunk) { if (isMethodSampling) { long p = enabled ? periodMillis : 0; JVM.getJVM().setMethodSamplingInterval(getId(), p); } this.beginChunk = beginChunk; this.endChunk = endChunk; this.period = periodMillis; } public void setStackTraceEnabled(boolean stackTraceEnabled) { this.stackTraceEnabled = stackTraceEnabled; if (isJVM) { JVM.getJVM().setStackTraceEnabled(getId(), stackTraceEnabled); } } public void setThreshold(long thresholdNanos) { this.thresholdTicks = Utils.nanosToTicks(thresholdNanos); if (isJVM) { JVM.getJVM().setThreshold(getId(), thresholdTicks); } } public boolean isEveryChunk() { return period == 0; } public boolean getStackTraceEnabled() { return stackTraceEnabled; } public long getThresholdTicks() { return thresholdTicks; } public long getPeriod() { return period; } public boolean hasEventHook() { return hasHook; } public void setEventHook(boolean hasHook) { this.hasHook = hasHook; } public boolean isBeginChunk() { return beginChunk; } public boolean isEndChunk() { return endChunk; } public boolean isInstrumented() { return isInstrumented; } public void setInstrumented() { isInstrumented = true; } public void markForInstrumentation(boolean markForInstrumentation) { this.markForInstrumentation = markForInstrumentation; } public boolean isMarkedForInstrumentation() { return markForInstrumentation; } public boolean setRegistered(boolean registered) { if (this.registered != registered) { this.registered = registered; updateCommittable(); LogTag logTag = isSystem() ? LogTag.JFR_SYSTEM_METADATA : LogTag.JFR_METADATA; if (registered) { Logger.log(logTag, LogLevel.INFO, "Registered " + getLogName()); } else { Logger.log(logTag, LogLevel.INFO, "Unregistered " + getLogName()); } if (!registered) { MetadataRepository.getInstance().setUnregistered(); } return true; } return false; } private void updateCommittable() { this.committable = enabled && registered; } public final boolean isRegistered() { return registered; } // Efficient check of enabled && registered public boolean isCommittable() { return committable; } public int getStackTraceOffset() { return stackTraceOffset; } public boolean isLargeSize() { return largeSize; } public void setLargeSize() { largeSize = true; } }
⏎ jdk/jfr/internal/PlatformEventType.java
Or download all of them as a single archive file:
File name: jdk.jfr-17.0.5-src.zip File size: 363343 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jlink.jmod - JLink Tool
2023-04-17, 8983👍, 0💬
Popular Posts:
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers. Both...
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
Java Cryptography Extension 1.2.2 JAR File Size and Download Location: File name: jce.jar, jce-1.2.2...