United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5059669 : Can not eliminate implicit null checks for method invocations based on profile

Details
Type:
Bug
Submit Date:
2004-06-08
Status:
Resolved
Updated Date:
2004-08-17
Project Name:
JDK
Resolved Date:
2004-07-13
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2_04
Fixed Versions:
1.4.2_06 (06)

Related Reports
Backport:
Relates:

Sub Tasks

Description
Observed many SEGV/FLTBOUNDS signals generated from JVM in running benchmark for
Java application of ISV and those signals seem to be related to few methods.
So, it may be possible to boost the performance by implementing JVM
as more suitable for the application.
The benchmark environment is v20z/Solaris9/Java_1.4.2_04.

[SEGV]

The Java application is huge cpu intensive one and tried truss to JVM running
the application. Then, saw huge number of SEGV in the truss output, 
it's about 6000 in about 80 seconds running.

truss -c -p 18000
^Cfaults -------------
FLTBOUNDS       6332
total:          6332

signals ------------
SIGSEGV         6332
total:          6332
<snip>

[NullPointerException]

And guess the SEGV/FLTBOUNDS cames from Null Checking mechanism for NullPointerException
then tried java studio debugger to identify where NullPointerException is generated
and found only few methods are related to the exception.

                                    

Comments
EVALUATION

In most cases, implicit null checks provide a performance benefit by
elimating the extra instructions needed for a null pointer check.  This
works well when NullPointerExceptions are extremely rare in the running
of a Java application (which is usually the case.)  However the overhead
of handing the SEGV can hurt performance if NullPointerExceptions occur
more often.    The compiler deals with this by not generating implicit
if the number of NullPointerExceptions seen in a method exceeds a
threshold (see bugid 4632854.)  However this was not being done for
null checks on method invocations.

The fix was to add an explicit null check for method invocations if
appropriate.

###@###.### 2004-06-08
                                     
2004-06-08
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_06
generic
tiger-rc

FIXED IN:
1.4.2_06
tiger-rc

INTEGRATED IN:
1.4.2_06
tiger-b58
tiger-rc


                                     
2004-08-18



Hardware and Software, Engineered to Work Together