# US 2006/0070027 A1 · Enhancing exception information in virtual machines

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2006/0070027 A1
- Document ID: US20060070027A1
- Status: Published application
- Kind: A1
- Application number: 10/949,042
- Filed: 2004-09-24
- Published: 2006-03-30
- Earliest claimed: 2004-09-24
- Inventors: Ralf Schmelter
- Web page: https://patentgrep.com/patent/US20060070027A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3471: {Address tracing}
- G06F 11/3447: {Performance evaluation by modeling}
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and apparatus, including computer systems and program products to provide a Java virtual machine (VM) a extraction mechanism, which enables the Java VM to store a root set of information, which will also be referred to as exception data, in exception objects. The exception handler that catches the exception object can then call an extraction method to read the exception data from the exception object, extract additional information from the call stack using the exception data, and dump the exception data and extracted information into a file where it can be inspected later. The information dumped into the file can be used to facilitate development and debugging of Java-based software. Unlike other types of trace mechanisms utilized in Java systems, e.g., which may dump the entire core, the extraction mechanism enables a limited amount of information relating to specific exceptions to be stored for later inspection.

## Claims

### Claim at position 1

1-22. (canceled)

### Claim 23

A method, comprising:
creating an exception object upon occurrence of an exception condition during running of an application program, the exception object being an instance of an exception object class;
selectively collecting exception information in runtime; and
storing the exception information in the exception object.

### Claim 24 (depends on 23)

The method of claim 23, wherein the selectively collecting of the exception information comprises determining the exception information based on exception configuration.

### Claim 25 (depends on 24)

The method of claim 24, further comprising receiving the exception configuration defining information constituting the exception information.

### Claim 26 (depends on 24)

The method of claim 24, wherein the exception configuration comprises one or more of manually entered exception configuration and dynamically changing exception configuration for different classes during runtime.

### Claim 27 (depends on 23)

The method of claim 23, wherein the exception information comprises one or more of data in static fields of classes corresponding to methods in a call stack, data in a constant pool, and data relating to a reference to the exception object.

### Claim 28 (depends on 23)

The method of claim 23, further comprising:
catching the exception object;
selectively retrieving trace data from the exception information at the exception object; and
dumping the trace data into a trace file.

### Claim 29 (depends on 28)

The method of claim 28, wherein the catching of the exception object further comprises:
traversing objects referenced in the exception information to a specified depth;
extracting trace information from the traversed objects; and
providing the trace information as the trace data to be dumped into the trace file.

### Claim 30 (depends on 23)

The method of claim 23, wherein the selectively collecting of the exception information further comprises:
inspecting the methods in the call stack, including methods below a topmost method; and
selectively collecting the exception information from the inspected methods.

### Claim 31

A system, comprising:
a virtual machine interfacing between a program code and a processor where the program code is executed, the virtual machine to:
create an exception object upon occurrence of an exception condition during running of an application program, the exception object being an instance of an exception object class;
selectively collect exception information in runtime; and
store the exception information in the exception object.

### Claim 32 (depends on 31)

The system of claim 31, wherein the selectively collecting of the exception information comprises determining the exception information based on exception configuration.

### Claim 33 (depends on 32)

The system of claim 32, further comprising receiving the exception configuration defining information constituting the exception information.

### Claim 34 (depends on 31)

The system of claim 31, wherein the exception information comprises one or more of data in static fields of classes corresponding to methods in a call stack, data in a constant pool, and data relating to a reference to the exception object.

### Claim 35 (depends on 31)

The system of claim 31, further comprising an extraction mechanism associated with the classes as identified by the virtual machine, the extraction mechanism to:
catch the exception object;
selectively retrieve trace data from the exception information at the exception object; and
dump the trace data into a trace file.

### Claim 36 (depends on 35)

The system of claim 35, wherein the extraction mechanism is further to:
traverse objects referenced in the exception information to a specified depth;
extract trace information from the traversed objects; and
provide the trace information as the trace data to be dumped into the trace file.

### Claim 37 (depends on 31)

The system of claim 31, wherein the virtual machine is further to:
inspect the methods in the call stack, including methods below a topmost method; and
selectively collect the exception information from the inspected methods

### Claim 38

A machine-readable medium having stored thereon instructions which, when executed by a machine, cause the machine to:
create an exception object upon occurrence of an exception condition during running of an application program, the exception object being an instance of an exception object class;
selectively collect exception information in runtime; and
store the exception information in the exception object.

### Claim 39 (depends on 38)

The machine-readable medium of claim 38, wherein the exception information comprises one or more of data in static fields of classes corresponding to methods in a call stack, data in a constant pool, and data relating to a reference to the exception object.

### Claim 40 (depends on 38)

The machine-readable medium of claim 38, wherein the instructions which, when executed by the machine, further caused the machine to:
catch the exception object;
selectively retrieve trace data from the exception information at the exception object; and
dump the trace data into a trace file.

### Claim 41 (depends on 40)

The machine-readable medium of claim 40, wherein the catching of the exception object further comprises:
traversing objects referenced in the exception information to a specified depth;
extracting trace information from the traversed objects; and
providing the trace information as the trace data to be dumped into the trace file.

### Claim 42 (depends on 38)

The machine-readable medium of claim 38, wherein the selectively collecting of the exception information further comprises:
inspecting the methods in the call stack, including methods below a topmost method; and
selectively collecting the exception information from the inspected methods.
