Skip to content
🤔 Documentation issue? Report it

Core: Hprof

shark-hprof / shark

Package shark


Name Summary
ByteArraySourceProvider class ByteArraySourceProvider :DualSourceProvider
ConstantMemoryMetricsDualSourceProvider class ConstantMemoryMetricsDualSourceProvider :DualSourceProvider
Captures IO read metrics without using much memory.
DualSourceProvider interface DualSourceProvider :StreamingSourceProvider,RandomAccessSourceProvider
Both a StreamingSourceProvider and a RandomAccessSourceProvider
FileSourceProvider class FileSourceProvider :DualSourceProvider
GcRoot sealed class GcRoot
A GcRoot as identified by HprofRecord.HeapDumpRecord.GcRootRecord in the heap dump.
Hprof class ~~Hprof~~ :Closeable
Hprof is deprecated, and we offer partial backward compatibility. Any code that was previously using HprofReader directly now has to call StreamingHprofReader.readerFor or HprofRandomAcccessReader.readerFor
HprofDeobfuscator class HprofDeobfuscator
Converts a Hprof file to another file with deobfuscated class and field names.
HprofHeader data class HprofHeader
Represents the header metadata of a Hprof file.
HprofPrimitiveArrayStripper class HprofPrimitiveArrayStripper
Converts a Hprof file to another file with all primitive arrays replaced with arrays of zeroes, which can be useful to remove PII. Char arrays are handled slightly differently because 0 would be the null character so instead these become arrays of ‘?’.
HprofReader class ~~HprofReader~~
HprofRecord sealed class HprofRecord
A Hprof record. These data structure map 1:1 with how records are written in hprof files.
HprofRecordReader class HprofRecordReader
Reads hprof content from an Okio BufferedSource.
HprofRecordTag enum class HprofRecordTag
HprofVersion enum class HprofVersion
Supported hprof versions
HprofWriter class HprofWriter :Closeable
Generates Hprof files.
OnHprofRecordListener interface OnHprofRecordListener
OnHprofRecordTagListener interface OnHprofRecordTagListener
Listener passed in to StreamingHprofReader.readRecords, gets notified for each HprofRecordTag found in the heap dump.
PrimitiveType enum class PrimitiveType
A primitive type in the prof.
ProguardMapping class ProguardMapping
ProguardMappingReader class ProguardMappingReader
RandomAccessHprofReader class RandomAccessHprofReader :Closeable
Reads records in a Hprof source, one at a time with a specific position and size. Call openReaderFor to obtain a new instance.
RandomAccessSource interface RandomAccessSource :Closeable
RandomAccessSourceProvider interface RandomAccessSourceProvider
Can open RandomAccessSource instances.
StreamingHprofReader class StreamingHprofReader
Reads the entire content of a Hprof source in one fell swoop. Call readerFor to obtain a new instance.
StreamingRecordReaderAdapter class StreamingRecordReaderAdapter
Wraps a StreamingHprofReader to provide a higher level API that streams HprofRecord instances.
StreamingSourceProvider interface StreamingSourceProvider
ValueHolder sealed class ValueHolder
A value in the heap dump, which can be a ReferenceHolder or a primitive type.


Name Summary
<no name provided> fun <no name provided>():Unit
Listener passed in to StreamingHprofReader.readRecords, gets notified for each HprofRecord found in the heap dump which types is in the set of the recordTypes parameter passed to StreamingHprofReader.readRecords.