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/Bits.java
/* * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.internal; import jdk.internal.misc.Unsafe; final class Bits { // package-private private static final Unsafe unsafe = Unsafe.getUnsafe(); private static final boolean unalignedAccess = unsafe.unalignedAccess(); private static final boolean bigEndian = unsafe.isBigEndian(); private Bits() { } // -- Swapping -- private static short swap(short x) { return Short.reverseBytes(x); } private static char swap(char x) { return Character.reverseBytes(x); } private static int swap(int x) { return Integer.reverseBytes(x); } private static long swap(long x) { return Long.reverseBytes(x); } private static float swap(float x) { return Float.intBitsToFloat(swap(Float.floatToIntBits(x))); } private static double swap(double x) { return Double.longBitsToDouble(swap(Double.doubleToLongBits(x))); } // -- Alignment -- private static boolean isAddressAligned(long a, int datumSize) { return (a & datumSize - 1) == 0; } // -- Primitives stored per byte private static byte char1(char x) { return (byte)(x >> 8); } private static byte char0(char x) { return (byte)(x ); } private static byte short1(short x) { return (byte)(x >> 8); } private static byte short0(short x) { return (byte)(x ); } private static byte int3(int x) { return (byte)(x >> 24); } private static byte int2(int x) { return (byte)(x >> 16); } private static byte int1(int x) { return (byte)(x >> 8); } private static byte int0(int x) { return (byte)(x ); } private static byte long7(long x) { return (byte)(x >> 56); } private static byte long6(long x) { return (byte)(x >> 48); } private static byte long5(long x) { return (byte)(x >> 40); } private static byte long4(long x) { return (byte)(x >> 32); } private static byte long3(long x) { return (byte)(x >> 24); } private static byte long2(long x) { return (byte)(x >> 16); } private static byte long1(long x) { return (byte)(x >> 8); } private static byte long0(long x) { return (byte)(x ); } private static void putCharBigEndianUnaligned(long a, char x) { putByte_(a , char1(x)); putByte_(a + 1, char0(x)); } private static void putShortBigEndianUnaligned(long a, short x) { putByte_(a , short1(x)); putByte_(a + 1, short0(x)); } private static void putIntBigEndianUnaligned(long a, int x) { putByte_(a , int3(x)); putByte_(a + 1, int2(x)); putByte_(a + 2, int1(x)); putByte_(a + 3, int0(x)); } private static void putLongBigEndianUnaligned(long a, long x) { putByte_(a , long7(x)); putByte_(a + 1, long6(x)); putByte_(a + 2, long5(x)); putByte_(a + 3, long4(x)); putByte_(a + 4, long3(x)); putByte_(a + 5, long2(x)); putByte_(a + 6, long1(x)); putByte_(a + 7, long0(x)); } private static void putFloatBigEndianUnaligned(long a, float x) { putIntBigEndianUnaligned(a, Float.floatToRawIntBits(x)); } private static void putDoubleBigEndianUnaligned(long a, double x) { putLongBigEndianUnaligned(a, Double.doubleToRawLongBits(x)); } private static void putByte_(long a, byte b) { unsafe.putByte(a, b); } private static void putBoolean_(long a, boolean x) { unsafe.putBoolean(null, a, x); } private static void putChar_(long a, char x) { unsafe.putChar(a, bigEndian ? x : swap(x)); } private static void putShort_(long a, short x) { unsafe.putShort(a, bigEndian ? x : swap(x)); } private static void putInt_(long a, int x) { unsafe.putInt(a, bigEndian ? x : swap(x)); } private static void putLong_(long a, long x) { unsafe.putLong(a, bigEndian ? x : swap(x)); } private static void putFloat_(long a, float x) { unsafe.putFloat(a, bigEndian ? x : swap(x)); } private static void putDouble_(long a, double x) { unsafe.putDouble(a, bigEndian ? x : swap(x)); } // external api static int putByte(long a, byte x) { putByte_(a, x); return Byte.BYTES; } static int putBoolean(long a, boolean x) { putBoolean_(a, x); return Byte.BYTES; } static int putChar(long a, char x) { if (unalignedAccess || isAddressAligned(a, Character.BYTES)) { putChar_(a, x); return Character.BYTES; } putCharBigEndianUnaligned(a, x); return Character.BYTES; } static int putShort(long a, short x) { if (unalignedAccess || isAddressAligned(a, Short.BYTES)) { putShort_(a, x); return Short.BYTES; } putShortBigEndianUnaligned(a, x); return Short.BYTES; } static int putInt(long a, int x) { if (unalignedAccess || isAddressAligned(a, Integer.BYTES)) { putInt_(a, x); return Integer.BYTES; } putIntBigEndianUnaligned(a, x); return Integer.BYTES; } static int putLong(long a, long x) { if (unalignedAccess || isAddressAligned(a, Long.BYTES)) { putLong_(a, x); return Long.BYTES; } putLongBigEndianUnaligned(a, x); return Long.BYTES; } static int putFloat(long a, float x) { if (unalignedAccess || isAddressAligned(a, Float.BYTES)) { putFloat_(a, x); return Float.BYTES; } putFloatBigEndianUnaligned(a, x); return Float.BYTES; } static int putDouble(long a, double x) { if (unalignedAccess || isAddressAligned(a, Double.BYTES)) { putDouble_(a, x); return Double.BYTES; } putDoubleBigEndianUnaligned(a, x); return Double.BYTES; } }
⏎ jdk/jfr/internal/Bits.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, 8996👍, 0💬
Popular Posts:
JDK 11 jdk.crypto.ec.jmod is the JMOD file for JDK 11 Crypto EC module. JDK 11 Crypto EC module comp...
XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with ...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...