United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6999491 non-zero COOPs are used when they should not
JDK-6999491 : non-zero COOPs are used when they should not

Details
Type:
Bug
Submit Date:
2010-11-12
Status:
Closed
Updated Date:
2012-10-01
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs19,hs20
Fixed Versions:
hs20 (b04)

Related Reports
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

Description
Running with "-Xmx35g -XX:HeapBaseMinAddress=32g" leads to COOPs used.
However, virtual space address limit exceeds 32g, so no COOPs should be used. 
ObjectAlignmentInBytes is equal to 8 in this case.

                                    

Comments
EVALUATION

Regression introduced by fix for next bug

6984368: Large default heap size does not allow to use zero based compressed oops

The next expression result is negative with such options and it will return huge unsigned value

inline uintx max_heap_for_compressed_oops() {
  // Heap should be above HeapBaseMinAddress to get zero based compressed oops.
  LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size() - HeapBaseMinAddress);

 so the next condition will be always true

  if (MaxHeapSize <= max_heap_for_compressed_oops()) {
                                     
2010-11-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/0ac62b4d6507
                                     
2010-11-12
PUBLIC COMMENTS

Regression introduced by fix for 6984368 bug. The expression in max_heap_for_compressed_oops() produces incorrect result when HeapBaseMinAddress > OopEncodingHeapMax.

HeapBaseMinAddress should be used only for a default heap size calculation.
Added heap size to PrintCompressedOopsMode output.
                                     
2010-11-12
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/0ac62b4d6507
                                     
2010-12-25



Hardware and Software, Engineered to Work Together