Package com.yourkit.api
Class MemorySnapshot
java.lang.Object
com.yourkit.api.MemorySnapshot
The class supports analysis of captured memory snapshots.
-
Constructor Summary
ConstructorsConstructorDescriptionMemorySnapshot
(File snapshotFile) Loads memory snapshot for analysis.MemorySnapshot
(File snapshotFile, ObfuscatorType obfuscatorType, File obfuscationLog) Loads memory snapshot for analysis, automatically restoring obfuscated class, method and field names. -
Method Summary
Modifier and TypeMethodDescriptionint
getObjectCount
(String xmlSetDescription) Calculates number of objects that correspond to the given description.long
getShallowSize
(String xmlSetDescription) Calculates shallow size of objects that correspond to the given description.
-
Constructor Details
-
MemorySnapshot
Loads memory snapshot for analysis.- Parameters:
snapshotFile
- the memory snapshot file to load; usually has extension.snapshot
or.hprof
- Throws:
Exception
- if snapshot cannot be loaded for some reason
-
MemorySnapshot
public MemorySnapshot(@NotNull File snapshotFile, @NotNull ObfuscatorType obfuscatorType, @Nullable File obfuscationLog) throws Exception Loads memory snapshot for analysis, automatically restoring obfuscated class, method and field names.- Parameters:
snapshotFile
- memory snapshot file to be loadedobfuscatorType
- obfuscator type; if profiled application was not obfuscated, specifyObfuscatorType.NONE
or use constructor with one parameterMemorySnapshot(File)
instead.obfuscationLog
- obfuscation log file created obfuscating the profiled application; if obfuscatorType isObfuscatorType.NONE
, specifyNULL
.- Throws:
Exception
- if snapshot cannot be loaded for some reason
-
-
Method Details
-
getObjectCount
Calculates number of objects that correspond to the given description. -
getShallowSize
Calculates shallow size of objects that correspond to the given description.
-