mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When I originally added this I did not understand how dtrace worked well enough. Turns out we do not need any of this runtime instrumentation and we can just dynamically instrument the calls. This commit rips out the all of the static calls and replaces the old runtime_statistics dtrace file with a new one that does the dynamic instrumentation for you. To do this one does the following: sudo dtrace -s ./swift/utils/runtime_statistics.d -c "$CMD" The statistics are currently focused around dynamic retain/release counts.
21 lines
320 B
D
21 lines
320 B
D
|
|
pid$target:*:swift_retain:entry
|
|
{
|
|
@counts["swift_retain"] = count();
|
|
}
|
|
|
|
pid$target:*:swift_release:entry
|
|
{
|
|
@counts["swift_release"] = count();
|
|
}
|
|
|
|
pid$target:*:objc_retain:entry
|
|
{
|
|
@counts["objc_retain"] = count();
|
|
}
|
|
|
|
pid$target:*:objc_release:entry
|
|
{
|
|
@counts["objc_release"] = count();
|
|
}
|