Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @ 8005:ec0c4951286c
8004710: NPG: jmap could throw sun.jvm.hotspot.types.WrongTypeException after PermGen removal
Summary: When calculating live object regions, make sure that the alignment reserve, at the end of a TLAB, is excluded.
Reviewed-by: jmasa, brutisso
author | stefank |
---|---|
date | Tue, 29 Jan 2013 10:51:33 +0100 |
parents | 8e47bac5643a |
children | f82bcc429e8c |
comparison
equal
deleted
inserted
replaced
7947:3c327c2b6782 | 8005:ec0c4951286c |
---|---|
112 /** These constants come from globalDefinitions.hpp */ | 112 /** These constants come from globalDefinitions.hpp */ |
113 private int invocationEntryBCI; | 113 private int invocationEntryBCI; |
114 private int invalidOSREntryBCI; | 114 private int invalidOSREntryBCI; |
115 private ReversePtrs revPtrs; | 115 private ReversePtrs revPtrs; |
116 private VMRegImpl vmregImpl; | 116 private VMRegImpl vmregImpl; |
117 private int reserveForAllocationPrefetch; | |
117 | 118 |
118 // System.getProperties from debuggee VM | 119 // System.getProperties from debuggee VM |
119 private Properties sysProps; | 120 private Properties sysProps; |
120 | 121 |
121 // VM version strings come from Abstract_VM_Version class | 122 // VM version strings come from Abstract_VM_Version class |
291 Type vmVersion = db.lookupType("Abstract_VM_Version"); | 292 Type vmVersion = db.lookupType("Abstract_VM_Version"); |
292 Address releaseAddr = vmVersion.getAddressField("_s_vm_release").getValue(); | 293 Address releaseAddr = vmVersion.getAddressField("_s_vm_release").getValue(); |
293 vmRelease = CStringUtilities.getString(releaseAddr); | 294 vmRelease = CStringUtilities.getString(releaseAddr); |
294 Address vmInternalInfoAddr = vmVersion.getAddressField("_s_internal_vm_info_string").getValue(); | 295 Address vmInternalInfoAddr = vmVersion.getAddressField("_s_internal_vm_info_string").getValue(); |
295 vmInternalInfo = CStringUtilities.getString(vmInternalInfoAddr); | 296 vmInternalInfo = CStringUtilities.getString(vmInternalInfoAddr); |
297 | |
298 CIntegerType intType = (CIntegerType) db.lookupType("int"); | |
299 CIntegerField reserveForAllocationPrefetchField = vmVersion.getCIntegerField("_reserve_for_allocation_prefetch"); | |
300 reserveForAllocationPrefetch = (int)reserveForAllocationPrefetchField.getCInteger(intType); | |
296 } catch (Exception exp) { | 301 } catch (Exception exp) { |
297 throw new RuntimeException("can't determine target's VM version : " + exp.getMessage()); | 302 throw new RuntimeException("can't determine target's VM version : " + exp.getMessage()); |
298 } | 303 } |
299 | 304 |
300 checkVMVersion(vmRelease); | 305 checkVMVersion(vmRelease); |
776 // returns null, if not available. | 781 // returns null, if not available. |
777 public String getVMInternalInfo() { | 782 public String getVMInternalInfo() { |
778 return vmInternalInfo; | 783 return vmInternalInfo; |
779 } | 784 } |
780 | 785 |
786 public int getReserveForAllocationPrefetch() { | |
787 return reserveForAllocationPrefetch; | |
788 } | |
789 | |
781 public boolean isSharingEnabled() { | 790 public boolean isSharingEnabled() { |
782 if (sharingEnabled == null) { | 791 if (sharingEnabled == null) { |
783 Flag flag = getCommandLineFlag("UseSharedSpaces"); | 792 Flag flag = getCommandLineFlag("UseSharedSpaces"); |
784 sharingEnabled = (flag == null)? Boolean.FALSE : | 793 sharingEnabled = (flag == null)? Boolean.FALSE : |
785 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); | 794 (flag.getBool()? Boolean.TRUE: Boolean.FALSE); |