JDK-6792386 : SA: jmap wrong output for MaxNewSize
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2009-01-11
  • Updated: 2011-01-19
  • Resolved: 2009-02-11
Related Reports
Relates :  
Relates :  
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.
11-02-2009