//shark-hprof/shark

Package shark

Types

NameSummary
ByteArraySourceProvider[jvm]
class ByteArraySourceProvider(byteArray: ByteArray) : DualSourceProvider
ConstantMemoryMetricsDualSourceProvider[jvm]
class ConstantMemoryMetricsDualSourceProvider(realSourceProvider: DualSourceProvider) : DualSourceProvider
Captures IO read metrics without using much memory.
DualSourceProvider[jvm]
interface DualSourceProvider : StreamingSourceProvider, RandomAccessSourceProvider
Both a StreamingSourceProvider and a RandomAccessSourceProvider
FileSourceProvider[jvm]
class FileSourceProvider(file: File) : DualSourceProvider
GcRoot[jvm]
sealed class GcRoot
A GcRoot as identified by HprofRecord.HeapDumpRecord.GcRootRecord in the heap dump.
HprofDeobfuscator[jvm]
class HprofDeobfuscator
Converts a Hprof file to another file with deobfuscated class and field names.
HprofHeader[jvm]
data class HprofHeader(heapDumpTimestamp: Long, version: HprofVersion, identifierByteSize: Int)
Represents the header metadata of a Hprof file.
HprofPrimitiveArrayStripper[jvm]
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 ‘?’.
HprofRecord[jvm]
sealed class HprofRecord
A Hprof record. These data structure map 1:1 with how records are written in hprof files.
HprofRecordReader[jvm]
class HprofRecordReader
Reads hprof content from an Okio BufferedSource.
HprofRecordTag[jvm]
enum HprofRecordTag : Enum<HprofRecordTag>
HprofVersion[jvm]
enum HprofVersion : Enum<HprofVersion>
Supported hprof versions
HprofWriter[jvm]
class HprofWriter : Closeable
Generates Hprof files.
OnHprofRecordListener[jvm]
fun interface OnHprofRecordListener
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.
OnHprofRecordTagListener[jvm]
fun interface OnHprofRecordTagListener
Listener passed in to StreamingHprofReader.readRecords, gets notified for each HprofRecordTag found in the heap dump.
PrimitiveType[jvm]
enum PrimitiveType : Enum<PrimitiveType>
A primitive type in the prof.
ProguardMapping[jvm]
class ProguardMapping
ProguardMappingReader[jvm]
class ProguardMappingReader(proguardMappingInputStream: InputStream)
RandomAccessHprofReader[jvm]
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[jvm]
interface RandomAccessSource : Closeable
RandomAccessSourceProvider[jvm]
fun interface RandomAccessSourceProvider
Can open RandomAccessSource instances.
StreamingHprofReader[jvm]
class StreamingHprofReader
Reads the entire content of a Hprof source in one fell swoop. Call readerFor to obtain a new instance.
StreamingRecordReaderAdapter[jvm]
class StreamingRecordReaderAdapter(streamingHprofReader: StreamingHprofReader)
Wraps a StreamingHprofReader to provide a higher level API that streams HprofRecord instances.
StreamingSourceProvider[jvm]
fun interface StreamingSourceProvider
Can open Source instances.
ThrowingCancelableFileSourceProvider[jvm]
class ThrowingCancelableFileSourceProvider(file: File, throwIfCanceled: Runnable) : DualSourceProvider
A DualSourceProvider that invokes throwIfCanceled before every read, allowing cancellation of IO based work built on top by throwing an exception.
ValueHolder[jvm]
sealed class ValueHolder
A value in the heap dump, which can be a ReferenceHolder or a primitive type.