Browse Prior Art Database

A New null-Area Arrangement in Java VM Suitable for Optimization

IP.com Disclosure Number: IPCOM000019916D
Original Publication Date: 2003-Oct-10
Included in the Prior Art Database: 2003-Oct-10
Document File: 3 page(s) / 9K

Publishing Venue

IBM

Abstract

Disclosed is a mechanism to make Java execution faster, by using a special value as null and preparing accessible and inaccessible pages around it.

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

Page 1 of 3

A New null-Area Arrangement in Java VM Suitable for Optimization

  Disclosed is a mechanism to make Java execution faster. In this mechanism, "null" value in Java does not points to zero as usual system does. Instead, null points to a memory address around where the mechanism prepares accessible page(s) and inaccessible page(s).

From here, the special (non-zero) value for null is called as "JAVANULL". Figure 1 shows an example page arrangement used in the disclosed mechanism.

¦--------¦

¦ ¦

JAVANULL-->¦ access ¦A

A ¦ -ible ¦¦ Object's field whose offset is inside this range

¦ ¦ page ¦¦ can be speculatively read before the nullcheck.

S¦ ¦ ¦V

¦ ¦--------¦

V ¦ ¦

¦ inacce ¦

¦-ssible ¦

¦ page ¦

¦ ¦

¦--------¦

Figure 1: An example null-area arrangement

The mechanism prepares accessible page(s) around JAVANULL. If [JAVANULL+offsetX] is inside the accessible page, the system can speculatively read [AnObject+offsetX] before the nullcheck of AnObject because it never causes access violation.

The mechanism also prepares inaccessible page(s) around JAVANULL. Consider a constant value S where [JAVANULL+S] is inside the inaccessible page, then the system can perform a nullcheck of an object by reading [AnObject+S] instead of comparing the value of AnObject with JAVANULL. Access violation occurs when AnObject is null, and appropriate processing such as raising NullPointerException will be done in the access-violation handler.

There are several possible variations for the null-area arrangement. Figure 2 shows an example of using negative value as S. This arrangement is suitable for processors which can access memory with negative offset.

¦--------¦

¦ ¦

¦ inacce ¦

¦-ssible ¦

A ¦ page ¦

S(negative)¦ ¦ ¦

V ¦--------¦

JAVANULL-->¦ ¦

¦ access ¦

¦ -ible ¦

¦ page ¦

¦ ¦

¦--------¦

Figure 2: Example null-area arrangement 2

1

Page 2 of 3

Usually Java object has several bytes of "header" before its body which contains field values. For such Java system, it is possible to arrange the null area as shown in Figure 3. S becomes zero in this arrangement, so nullcheck can be performed by just reading [AnObject].

¦--------¦

¦ ¦

¦ inacce ¦

¦-ssible ¦

¦ page ¦

JAVANULL-->¦ ¦A__size of

(S=0) ¦--------¦V object header

¦ ¦

¦ access ¦

¦...