Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
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/consumer/ConstantMap.java
/* * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.internal.consumer; import jdk.jfr.internal.LogLevel; import jdk.jfr.internal.LogTag; import jdk.jfr.internal.Logger; import jdk.jfr.internal.LongMap; /** * Holds mapping between a set of keys and their corresponding object. * * If the type is a known type, i.e. {@link jdk.jfr.consumer.RecordedThread}, an * {@link ObjectFactory} can be supplied which will instantiate a typed object. */ final class ConstantMap { private static final int RESOLUTION_FINISHED = 0; private static final int RESOLUTION_STARTED = 1; public static final ConstantMap EMPTY = new ConstantMap(); // A temporary placeholder, so objects can // reference themselves (directly, or indirectly), // when making a transition from numeric id references // to normal Java references. private static final class Reference { private final long key; private final ConstantMap pool; Reference(ConstantMap pool, long key) { this.pool = pool; this.key = key; } Object resolve() { return pool.get(key); } @Override public String toString() { return "ref: " + pool.name + "[" + key + "]"; } } final ObjectFactory<?> factory; final String name; private final LongMap<Object> objects; private boolean resolving; private boolean allResolved; private ConstantMap() { this(null, "<empty>"); allResolved = true; } ConstantMap(ObjectFactory<?> factory, String name) { this.name = name; this.objects = new LongMap<>(2); this.factory = factory; } Object get(long id) { // fast path, all objects in pool resolved if (allResolved) { return objects.get(id); } // referenced from a pool, deal with this later if (!resolving) { return new Reference(this, id); } // should ideally always have a value Object value = objects.get(id); if (value == null) { // unless id is 0 which is used to represent null if (id != 0) { Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Missing object id=" + id + " in pool " + name + ". All ids should reference an object"); } return null; } // id is resolved (but not the whole pool) if (objects.isSetId(id, RESOLUTION_FINISHED)) { return value; } // resolving ourself, abort to avoid infinite recursion if (objects.isSetId(id, RESOLUTION_STARTED)) { return null; } // mark id as STARTED if we should // come back during object resolution objects.setId(id, RESOLUTION_STARTED); // resolve object! Object resolved = resolve(value); // mark id as FINISHED objects.setId(id, RESOLUTION_FINISHED); // if a factory exists, convert to RecordedThread. // RecordedClass etc. and store back results if (factory != null) { Object factorized = factory.createObject(id, resolved); objects.put(id, factorized); return factorized; } else { objects.put(id, resolved); return resolved; } } private static Object resolve(Object o) { if (o instanceof Reference r) { return resolve(r.resolve()); } if (o != null && o.getClass().isArray()) { final Object[] array = (Object[]) o; for (int i = 0; i < array.length; i++) { Object element = array[i]; array[i] = resolve(element); } return array; } return o; } public void resolve() { objects.forEachKey(k -> get(k)); } public void put(long key, Object value) { if (objects.hasKey(key)) { objects.clearId(key); } objects.put(key, value); } public void setResolving() { resolving = true; allResolved = false; } public void setResolved() { allResolved = true; resolving = false; } public String getName() { return name; } public Object getResolved(long id) { return objects.get(id); } public void putResolved(long id, Object object) { objects.put(id, object); objects.setId(id, RESOLUTION_FINISHED); } public void setAllResolved(boolean allResolved) { this.allResolved = allResolved; } }
⏎ jdk/jfr/internal/consumer/ConstantMap.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, ≈31🔥, 0💬
Popular Posts:
How to compare performances of various XML parsers with the jaxp\SourceValidator.jav aprovided in th...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...
What is the dom\ElementPrinter.java provided in the Apache Xerces package? I have Apache Xerces 2.11...
commons-net-1.4.1.jar is the JAR file for Apache Commons Net 1.4.1, which implements the client side...
Rhino JavaScript Java Library is an open-source implementation of JavaScript written entirely in Jav...