United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7021653 Parfait issue in hotspot/src/share/vm/oops/methodDataOops.hpp
JDK-7021653 : Parfait issue in hotspot/src/share/vm/oops/methodDataOops.hpp

Details
Type:
Bug
Submit Date:
2011-02-23
Status:
Closed
Updated Date:
2012-05-02
Project Name:
JDK
Resolved Date:
2011-04-24
Component:
hotspot
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs21 (b05)

Related Reports
Backport:
Relates:

Sub Tasks

Description
One of the parfait build issues of jdk7 was item #1 in the original bug 6939019, but it was not addressed as far as I can tell.

A one line source patch is required for the Solaris JDK build to successfully build with parfait. The issue is on line 231 of hotspot/src/share/vm/oops/methodDataOops.hpp which reads:
        static ByteSize cell_offset(int index) {
            return byte_offset_of(DataLayout, _cells[index]);
        }

The problem arises from the _cells[index] notation which is a non-standard extension of the C++ language which is not accepted by the GCC based compiler that Parfait uses to perform code analysis. The above _cells[index] notation is actually syntactic sugar for a more complex calculation. By making the calculation explicit, the code can be compiled by both the Sun Studio compiler and GCC compilers to produce the same result:
        static ByteSize cell_offset(int index) {
            return byte_offset_of(DataLayout, _cells) + in_ByteSize(index * sizeof(intptr_t));
        }
If this change were integrated into the main JDK then Parfait would be able to analyze both Linux and Solaris builds without the need    for any source patches.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/f767174aac14
                                     
2011-03-04
EVALUATION

Summary: Fix compilation error(s)
Reviewed-by: kvn, phh, jcoomes, dholmes
                                     
2011-03-04



Hardware and Software, Engineered to Work Together