|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yourkit.api.MemorySnapshot
public final class MemorySnapshot
The class supports analysis of captured memory snapshots.
| Constructor Summary | |
|---|---|
MemorySnapshot(java.io.File snapshotFile)
Loads memory snapshot for analysis. |
|
MemorySnapshot(java.io.File snapshotFile,
ObfuscatorType obfuscatorType,
java.io.File obfuscationLog)
Loads memory snapshot for analysis, automaticaly restoring obfuscated class, method and field names. |
|
| Method Summary | |
|---|---|
void |
dispose()
Deprecated. This method does nothing and must not be called. Allocated resources are released in the finalizer. |
int |
getObjectCount(java.lang.String xmlSetDescription)
Calculates number of objects that correspond to the given description. |
long |
getShallowSize(java.lang.String xmlSetDescription)
Calculates shallow size of objects that correspond to the given description. |
void |
saveIndexFile()
Save snapshot index file (read about snapshot index in the Help.) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemorySnapshot(java.io.File snapshotFile)
throws java.lang.Exception
java.lang.Exception - if snapshot cannot be loaded for some reason
public MemorySnapshot(java.io.File snapshotFile,
ObfuscatorType obfuscatorType,
java.io.File obfuscationLog)
throws java.lang.Exception
snapshotFile - memory snapshot file to be loadedobfuscatorType - obfuscator type; if profiled application was not obfuscated, specify ObfuscatorType.NONE
or use constructor with one parameter MemorySnapshot(File) instead.obfuscationLog - obfuscation log file created obfuscating the profiled application;
if obfuscatorType is ObfuscatorType.NONE, specify null.
java.lang.Exception - if snapshot cannot be loaded for some reason| Method Detail |
|---|
public int getObjectCount(java.lang.String xmlSetDescription)
throws java.lang.Exception
getObjectCount("<objects class=\"java.lang.Strings\">")
java.lang.Exception
public void dispose()
throws java.lang.Exception
java.lang.Exception
public long getShallowSize(java.lang.String xmlSetDescription)
throws java.lang.Exception
getShallowSize("<objects class=\"java.lang.Object\"/>")
getShallowSize(
"<retained-objects>" +
"<objects class=\"java.lang.String\"/>" +
"</retained-objects>"
)
Please refer to the Help for details on object set description language.
java.lang.Exception
public void saveIndexFile()
throws java.lang.Exception
Save snapshot index file (read about snapshot index in the Help.)
The index file will be created in the same directory as the snapshot file, and its name will be formed from the snapshot file name with ".index" postfix added.
For example:
Snapshot file name: foo.snapshot -- index file name: foo.snapshot.index
Snapshot file name: bar.hprof -- index file name: bar.hprof.index
If the index file already exists, it will be overwritten.
Make sure the directory where snapshot is located is writeable and there is enough disk space (the index size can be comparable with the size of the snapshot.)
java.lang.Exception - java.lang.Exception if index file cannot be saved for some reason
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||