GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - flight-recorder/method-tracer: Java program that demonstrates programmatic use of the jdk.MethodTiming and jdk.MethodTracing events added in JDK 25.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
ControlPanel.java
ControlPanel.java
 
 
HostPortPanel.java
HostPortPanel.java
 
 
MainFrame.java
MainFrame.java
 
 
MainPanel.java
MainPanel.java
 
 
MethodItem.java
MethodItem.java
 
 
MethodTracer.java
MethodTracer.java
 
 
README.md
README.md
 
 
StackFrameMenu.java
StackFrameMenu.java
 
 
StackFrameNode.java
StackFrameNode.java
 
 
StackTracePanel.java
StackTracePanel.java
 
 
StreamResource.java
StreamResource.java
 
 
TableSelection.java
TableSelection.java
 
 
TimingColumn.java
TimingColumn.java
 
 
TimingItem.java
TimingItem.java
 
 
TimingPanel.java
TimingPanel.java
 
 
TimingRenderer.java
TimingRenderer.java
 
 
TimingTable.java
TimingTable.java
 
 
screenshot.png
screenshot.png
 
 

Repository files navigation

Description

JEP 520: JFR Method Timing & Tracing introduces two new events for tracing and timing methods. Timing and tracing method invocations can help identify performance bottlenecks, optimize code, and find the root causes of bugs.

To validate the design and demonstrate how third-party tools can use the JFR APIs with these two new events, a Java Swing program called Method Tracer was created.

Method Tracer

Usage

$ git clone https://github.com/flight-recorder/method-tracer
$ cd method-tracer
$ java MethodTracer.java

It is also possible to start Method Tracer with a source:

$ java MethodTracer.java [source]

[source]

The source specifies where Method Tracer streams events from. It can be a network address, a JMX service URL, or self. If the parameter is omitted, a dialog will be displayed where the source can be selected.

Network address

Method Tracer can stream events over JMX, but it requires the management agent to be running on the target JVM. The management agent can be started by specifying the following properties at startup:

$ java -Dcom.sun.management.jmxremote.port=7091 \
       -Dcom.sun.management.jmxremote.authenticate=false \
       -Dcom.sun.management.jmxremote.ssl=false \
       com.example.MyApplication

The management agent can also be started using jcmd:

$ jcmd com.example.MyApplication \
       ManagementAgent.start \
       jmxremote.port=7091 \
       jmxremote.authenticate=false \
       jmxremote.ssl=false

Examples:

$ java MethodTracer.java example.com:7091
$ java MethodTracer.java \
       service:jmx:rmi:///jndi/rmi://com.example:7091/jmxrmi

Additional information on how to set up the management agent can be found here. Method Tracer does not support SSL or authentication, so it should not be used in environments where security is a concern.

Self

Specify self to make Method Tracer stream events from itself. This is mostly useful for debugging and demonstration purposes.

Example:

$ java MethodTracer.java self

About

Java program that demonstrates programmatic use of the jdk.MethodTiming and jdk.MethodTracing events added in JDK 25.

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.