Browse Prior Art Database

A Method And System For Profiling Static And Dynamic Code Is Disclosed

IP.com Disclosure Number: IPCOM000200558D
Publication Date: 2010-Oct-19
Document File: 2 page(s) / 18K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system for profiling static and dynamic code is disclosed.

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

Page 01 of 2

A Method And System For Profiling Static And Dynamic Code Is Disclosed

The method and system uses a profiler for registering events that identify load addresses and lengths for a generated code. For example, a Java*

Virtual Machine

Tool Interface (JVMTI) Compiled Method Load event identifies a load address and the length for various Java* methods. The profiler registers the events for supporting call stack sampling. When the profiler receives these events, it associates the information received with the Java* method identified in the event and/or performs further processing with that information. The profiler achieves this by recording the most recent information with the Java* method identified in the event.

Alternatively, the profiler may

associate the information using a Last In-First Out (LIFO) queue. In this case, priority is given to the most recently generated code.

In an exemplary embodiment of the method and system, the information recorded by the profiler is handed to a component handling an Address to Name (

A2N) routine. The

component may have specialized support for code that is generated dynamically and may be overlaid.

During call stack sampling, a call stack from an interrupted thread is retrieved from a Java Virtual Machine (JVM) and added to a leaf node of a tree by a sampler. The address reflecting the instruction executing at the time an interrupt is signaled is also retrieved by the sampler. If the address matches the address range of a Java* method associated with the interrupted thread, then a base or sampling count for that leaf node is incremented.

If the address does not fall within the range of the generated code for the Java* method, then additional processing is performed. The processing may include checking the parent of the leaf node and if the range does not fall within the range of generated code for the parent, then checking its children for a match. In addition, siblings and any entries in the call stack returned by the JVM may be checked. If there is no match, then the sampler calls the A2N routine to check whether there i...