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/tool/Print.java
/* * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jfr.internal.tool; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.nio.charset.Charset; import java.nio.file.Path; import java.util.ArrayList; import java.util.Deque; import java.util.List; import java.util.function.Predicate; import jdk.jfr.EventType; final class Print extends Command { @Override public String getName() { return "print"; } @Override public List<String> getOptionSyntax() { List<String> list = new ArrayList<>(); list.add("[--xml|--json]"); list.add("[--categories <filter>]"); list.add("[--events <filter>]"); list.add("[--stack-depth <depth>]"); list.add("<file>"); return list; } @Override protected String getTitle() { return "Print contents of a recording file"; } @Override public String getDescription() { return getTitle() + ". See 'jfr help print' for details."; } @Override public void displayOptionUsage(PrintStream stream) { stream.println(" --xml Print recording in XML format"); stream.println(); stream.println(" --json Print recording in JSON format"); stream.println(); stream.println(" --categories <filter> Select events matching a category name."); stream.println(" The filter is a comma-separated list of names,"); stream.println(" simple and/or qualified, and/or quoted glob patterns"); stream.println(); stream.println(" --events <filter> Select events matching an event name."); stream.println(" The filter is a comma-separated list of names,"); stream.println(" simple and/or qualified, and/or quoted glob patterns"); stream.println(); stream.println(" --stack-depth <depth> Number of frames in stack traces, by default 5"); stream.println(); stream.println(" <file> Location of the recording file (.jfr)"); stream.println(); stream.println(); stream.println("Example usage:"); stream.println(); stream.println(" jfr print --events OldObjectSample recording.jfr"); stream.println(); stream.println(" jfr print --events CPULoad,GarbageCollection recording.jfr"); stream.println(); char q = quoteCharacter(); stream.println(" jfr print --categories " + q + "GC,JVM,Java*" + q + " recording.jfr"); stream.println(); stream.println(" jfr print --events "+ q + "jdk.*" + q +" --stack-depth 64 recording.jfr"); stream.println(); stream.println(" jfr print --json --events CPULoad recording.jfr"); } @Override public void execute(Deque<String> options) throws UserSyntaxException, UserDataException { Path file = getJFRInputFile(options); PrintWriter pw = new PrintWriter(System.out, false, Charset.forName("UTF-8")); Predicate<EventType> eventFilter = null; int stackDepth = 5; EventPrintWriter eventWriter = null; int optionCount = options.size(); boolean foundEventFilter = false; boolean foundCategoryFilter = false; while (optionCount > 0) { if (acceptFilterOption(options, "--events")) { if (foundEventFilter) { throw new UserSyntaxException("use --events event1,event2,event3 to include multiple events"); } foundEventFilter = true; String filter = options.remove(); warnForWildcardExpansion("--events", filter); eventFilter = addEventFilter(filter, eventFilter); } if (acceptFilterOption(options, "--categories")) { if (foundCategoryFilter) { throw new UserSyntaxException("use --categories category1,category2 to include multiple categories"); } foundCategoryFilter = true; String filter = options.remove(); warnForWildcardExpansion("--categories", filter); eventFilter = addCategoryFilter(filter, eventFilter); } if (acceptOption(options, "--stack-depth")) { String value = options.pop(); try { stackDepth = Integer.parseInt(value); if (stackDepth < 0) { throw new UserSyntaxException("stack depth must be zero or a positive integer."); } } catch (NumberFormatException nfe) { throw new UserSyntaxException("not a valid value for --stack-depth"); } } if (acceptFormatterOption(options, eventWriter, "--json")) { eventWriter = new JSONWriter(pw); } if (acceptFormatterOption(options, eventWriter, "--xml")) { eventWriter = new XMLWriter(pw); } if (optionCount == options.size()) { // No progress made checkCommonError(options, "--event", "--events"); checkCommonError(options, "--category", "--categories"); throw new UserSyntaxException("unknown option " + options.peek()); } optionCount = options.size(); } if (eventWriter == null) { eventWriter = new PrettyWriter(pw); // default to pretty printer } eventWriter.setStackDepth(stackDepth); if (eventFilter != null) { eventFilter = addCache(eventFilter, eventType -> eventType.getId()); eventWriter.setEventFilter(eventFilter); } try { eventWriter.print(file); } catch (IOException ioe) { couldNotReadError(file, ioe); } pw.flush(); } private static boolean acceptFormatterOption(Deque<String> options, EventPrintWriter eventWriter, String expected) throws UserSyntaxException { if (expected.equals(options.peek())) { if (eventWriter != null) { throw new UserSyntaxException("only one format can be specified at a time"); } options.remove(); return true; } return false; } }
⏎ jdk/jfr/internal/tool/Print.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, 8965👍, 0💬
Popular Posts:
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
How to download and install JDK (Java Development Kit) 7? If you want to write Java applications, yo...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...