United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6792386 : SA: jmap wrong output for MaxNewSize

Details
Type:
Bug
Submit Date:
2009-01-11
Status:
Closed
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2009-02-11
Component:
core-svc
OS:
generic
Sub-Component:
tools
CPU:
generic
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
7
Fixed Versions:

Related Reports
Relates:
Relates:

Sub Tasks

Description
After fix to 6788173, jmap still does not print value of MaxNewSize correctly.

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 1029701632 (982.0MB)
   NewSize          = 2686976 (2.5625MB)
   MaxNewSize       = 17592186044415 MB
   OldSize          = 5439488 (5.1875MB)
...

There are two problems now:
1. Format is wrong. Before the fix (and all other memory parameters, previously and now) are shown as
   "bytes (mbytes MB)"
or "bytes (gbytes GB)" 

2. The value is unreasonably big. It's bigger than MaxHeapSize.

                                    

Comments
EVALUATION

Problem 1:.

Java does not support unsinged long (64bit) so it is difficult to print the max value of unsigned long (64bit) in java so we do not print for this case or any value which is greater than the max value of signed long
(64bit).

Problem 2:
If the MaxNewSize is not set in command line then vm uses the max value of
unsigned long (64bit) for MaxNewSize. SA just reads the value of MaxNewSize
variable and prints it. Whatever is set in vm you see it here.
                                     
2009-02-11



Hardware and Software, Engineered to Work Together