Closed hassila closed 1 year ago
Try to hooking swift_retain/swift_release to allow capturing of ARC traffic as a metric.
Some possible hints:
https://github.com/apple/swift-async-algorithms/blob/main/Sources/_CAsyncSequenceValidationSupport/_CAsyncSequenceValidationSupport.h
https://github.com/apple/swift/blob/b123204b928b00db1b3ea81fe1a85a314825624e/stdlib/public/runtime/HeapObject.cpp
https://github.com/apple/swift/blob/b123204b928b00db1b3ea81fe1a85a314825624e/include/swift/Runtime/InstrumentsSupport.h
Thinking multiple possible metrics:
retain release retain/release delta (would be positive for cycles, should be zero for well behaving code)
retain
release
retain/release delta
Try to hooking swift_retain/swift_release to allow capturing of ARC traffic as a metric.