Browse Prior Art Database

Attachment and detachment of a profiler/debugger to a running JVM

IP.com Disclosure Number: IPCOM000028798D
Original Publication Date: 2004-Jun-01
Included in the Prior Art Database: 2004-Jun-01
Document File: 1 page(s) / 30K

Publishing Venue

IBM

Abstract

System Java (TM) applications, like Websphere (TM), are becoming more complex with large start up times. Thus it is becoming increasingly important that analysis and/or debugging does not require system shut down. Current technology does not allow attachment of profiler to the Java Virtual Machine (JVM) after the JVM has started. Thus, there is a growing need for such an attachment. General Solution: Enhance the JVM to support a profiler interface which attaches after the JVM is running. We describe three different approaches to this problem.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Attachment and detachment of a profiler /debugger to a running JVM

Approach I)

The JVM creates a socket and a listening thread on that socket at the time the JVM is being initialized. A driver program which attaches to the socket can send commands to the JVM. The commands include: (A) Attach to a profiler with some user specified parameters.

(B) Detach the profiler

For the Attach command, the listening thread loads the profiler and executes the start up sequence. The start up sequence has a new interface that tells the profiler that it is loaded to an already running JVM. The profiler can then issue callbacks to the JVM and enable events to perform the required tasks (that were identified by the parameters sent via the socket to the listening thread.)

Approach II)

At initialization the JVM is told to read something periodically, such as, a file, an environment variable, etc. The file is updated with commands that the JVM eventually reads. Some other program updates the communication vehicle.

Approach III)

The profiler is loaded independently and makes calls to the JVM to perform the required initialization.

The advantage for all 3 approaches is that the profiler can be loaded and started without stopping the application.

(1) Java is a trademark of Sun Microsystems
(2) Websphere is a trademark of International Business Machines

1