public class SnapshotInfo extends Object implements Serializable
ISnapshot
. Each snapshot has some core data, like
the date when it was acquired/parsed, the number of objects inside... This
data is available with the snapshot info which is usually serialized along
with the snapshot.Constructor and Description |
---|
SnapshotInfo(String path,
String jvmInfo,
int identifierSize,
Date creationDate,
int numberOfObjects,
int numberOfGCRoots,
int numberOfClasses,
int numberOfClassLoaders,
long usedHeapSize)
Deprecated.
|
SnapshotInfo(String path,
String prefix,
String jvmInfo,
int identifierSize,
Date creationDate,
int numberOfObjects,
int numberOfGCRoots,
int numberOfClasses,
int numberOfClassLoaders,
long usedHeapSize)
Construct a snapshot info.
|
Modifier and Type | Method and Description |
---|---|
Date |
getCreationDate()
Get date when the snapshot was acquired/parsed.
|
int |
getIdentifierSize()
Get size of the internal identifiers in the heap dump, i.e.
|
String |
getJvmInfo()
Get version of the JVM from which it was acquired.
|
int |
getNumberOfClasses()
Get number of Java Classes found in the snapshot.
|
int |
getNumberOfClassLoaders()
Get number of ClassLoaders found in the snapshot
|
int |
getNumberOfGCRoots()
Get number of GC roots found in the snapshot.
|
int |
getNumberOfObjects()
Get number of Java objects found in the snapshot.
|
String |
getPath()
Get the absolute path of the heap dump file.
|
String |
getPrefix()
Get the common prefix used to name all additional (e.g.
|
Serializable |
getProperty(String name)
Get extra information about the snapshot
|
long |
getUsedHeapSize()
Get number of bytes used in the heap (the allocated memory may be higher)
|
Serializable |
setProperty(String name,
Serializable value)
Store extra information about the snapshot
|
String |
toString() |
public SnapshotInfo(String path, String prefix, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)
path
- path from where the snapshot was acquiredjvmInfo
- version of the JVM from which it was acquiredidentifierSize
- size of the internal identifiers in the heap dump, i.e. 32 or
64 bitcreationDate
- date when the snapshot was acquired/parsednumberOfObjects
- number of Java objects found in the snapshotnumberOfGCRoots
- number of GC roots found in the snapshotnumberOfClasses
- number of Java Classes found in the snapshotnumberOfClassLoaders
- number of ClassLoaders found in the snapshotusedHeapSize
- number of bytes used in the heap (the allocated memory may be
higher)@Deprecated public SnapshotInfo(String path, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)
public Serializable getProperty(String name)
name
- keep_unreachable_objects - GCRootInfo.Type
hprof.version
org.eclipse.mat.snapshot.UnreachableObjectsHistogram
$heapFormatpublic Serializable setProperty(String name, Serializable value)
name
- value
- keep_unreachable_objects - mark as GCRootInfo.Type
hprof.version
org.eclipse.mat.snapshot.UnreachableObjectsHistogram
$heapFormatpublic String getPath()
public String getPrefix()
public String getJvmInfo()
public int getIdentifierSize()
public Date getCreationDate()
null
if the creation date is not
knownpublic int getNumberOfObjects()
public int getNumberOfGCRoots()
public int getNumberOfClasses()
public int getNumberOfClassLoaders()
public long getUsedHeapSize()