java.lang.Object
com.ibm.dtfj.phd.PHDImage
- All Implemented Interfaces:
Image
,ManagedImage
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this image and any associated resources.protected void
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver.Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.long
Use the filename if of the form heapdump.yyyyMMdd.HHmmss.pid.seq.phd else the file datelong
Get the value of the JVM's high-resolution timer when the image was created.Get the host name of the system where the image was running.long
Get the amount of physical memory (in bytes) installed in the system on which the image was running.The set of IP addresses (as InetAddresses) which the system running the image possessed.int
Get the number of CPUs running in the system on which the image was running.Get the precise model of the CPU.Get the family name for the processor on which the image was running.Gets the OS specific properties for this image.A unique identifier for the source of this imageGet the detailed name of the operating system.Get the family name for the operating system.void
registerReader
(HeapdumpReader reader) Register a HeapdumpReader as needing to be closed when Image.close() is called on this Image.void
setImageSource
(ManagedImageSource source) void
unregisterReader
(HeapdumpReader reader) Unregister a HeapdumpReader so it no longer needs to be closed.Methods declared in class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface com.ibm.dtfj.image.Image
isTruncated
-
Method Details
-
getSource
Description copied from interface:Image
A unique identifier for the source of this image -
getAddressSpaces
Description copied from interface:Image
Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.- Specified by:
getAddressSpaces
in interfaceImage
- Returns:
- an Iterator which iterates over all of the address spaces described by this Image
- See Also:
-
getCreationTime
Use the filename if of the form heapdump.yyyyMMdd.HHmmss.pid.seq.phd else the file date- Specified by:
getCreationTime
in interfaceImage
- Returns:
- the image creation time in milliseconds since 1970
- Throws:
DataUnavailable
-
getHostName
Description copied from interface:Image
Get the host name of the system where the image was running.- Specified by:
getHostName
in interfaceImage
- Returns:
- The host name of the system where the image was running. This string will be non-null and non-empty
- Throws:
DataUnavailable
- If the image did not provide this information (would happen if the system did not know its host name or if the image predated this feature).CorruptDataException
-
getIPAddresses
Description copied from interface:Image
The set of IP addresses (as InetAddresses) which the system running the image possessed.- Specified by:
getIPAddresses
in interfaceImage
- Returns:
- An Iterator over the IP addresses (as InetAddresses) which the system running the image possessed. The iterator will be non-null (but can be empty if the host is known to have no IP addresses).
- Throws:
DataUnavailable
- If the image did not provide this information (would happen if the system failed to look them up or if the image pre-dated this feature).- See Also:
-
getInstalledMemory
Description copied from interface:Image
Get the amount of physical memory (in bytes) installed in the system on which the image was running.- Specified by:
getInstalledMemory
in interfaceImage
- Returns:
- the amount of physical memory installed in the system on which the image was running. The return value is specified in bytes.
- Throws:
DataUnavailable
- if the information cannot be provided
-
getProcessorCount
Description copied from interface:Image
Get the number of CPUs running in the system on which the image was running.- Specified by:
getProcessorCount
in interfaceImage
- Returns:
- the number of CPUs running in the system on which the image was running
- Throws:
DataUnavailable
- if the information cannot be provided
-
getProcessorSubType
Description copied from interface:Image
Get the precise model of the CPU.- Specified by:
getProcessorSubType
in interfaceImage
- Returns:
- the precise model of the CPU (note that this can be an empty string but not null).
e.g. getProcessorType() will returnx86
where getProcessorSubType() may returnPentium IV step 4
Note that this value is platform and implementation dependent.
- Throws:
DataUnavailable
CorruptDataException
-
getProcessorType
Description copied from interface:Image
Get the family name for the processor on which the image was running.- Specified by:
getProcessorType
in interfaceImage
- Returns:
- the family name for the processor on which the image was running. This corresponds to the value you would find in the "os.arch" System property.
- Throws:
DataUnavailable
- if this data cannot be inferred from this core typeCorruptDataException
- if expected data cannot be read from the core
-
getSystemSubType
Description copied from interface:Image
Get the detailed name of the operating system.- Specified by:
getSystemSubType
in interfaceImage
- Returns:
- the detailed name of the operating system, or an empty string if this information is not available (null will never be returned). This should be the same value that would be returned for the "os.version" system property
- Throws:
DataUnavailable
CorruptDataException
-
getSystemType
Description copied from interface:Image
Get the family name for the operating system.- Specified by:
getSystemType
in interfaceImage
- Returns:
- the family name for the operating system. This should be the same value that would be returned for the "os.name" system property
- Throws:
DataUnavailable
- if this data cannot be inferred from this core typeCorruptDataException
- if expected data cannot be read from the core
-
close
public void close()Description copied from interface:Image
Close this image and any associated resources.
Some kinds of Image require the generation of temporary resources, for example temporary files created when reading core files and libraries from .zip archives. Ordinarily, these resources are deleted at JVM shutdown, but DTFJ applications may want to free them earlier. This method should only be called when the Image is no longer needed. After this method has been called, any objects associated with the image will be in an invalid state.
-
finalize
Description copied from class:java.lang.Object
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. Subclasses can use this facility to guarantee that any associated resources are cleaned up before the receiver is garbage collected. Uncaught exceptions which are thrown during the running of the method cause it to terminate immediately, but are otherwise ignored.Note: The virtual machine assumes that the implementation in class Object is empty.
-
registerReader
Register a HeapdumpReader as needing to be closed when Image.close() is called on this Image. -
unregisterReader
Unregister a HeapdumpReader so it no longer needs to be closed. This should only be called by HeapdumpReader.close() to make sure that we don't leak readers. -
getProperties
Description copied from interface:Image
Gets the OS specific properties for this image.- Specified by:
getProperties
in interfaceImage
- Returns:
- a set of OS specific properties
-
getImageSource
- Specified by:
getImageSource
in interfaceManagedImage
-
setImageSource
- Specified by:
setImageSource
in interfaceManagedImage
-
getCreationTimeNanos
Description copied from interface:Image
Get the value of the JVM's high-resolution timer when the image was created.- Specified by:
getCreationTimeNanos
in interfaceImage
- Returns:
- the value of the high-resolution timer, in nanoseconds
- Throws:
DataUnavailable
- if the image creation time is not availableCorruptDataException
- if the image creation time is corrupted
-