Files
swift-mirror/utils/runtime_statistics.d
Michael Gottesman 14a3ab61cb Use dynamic runtime instrumentation for dtrace instead of static instrumentation.
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.
2015-12-28 18:17:12 -06:00

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();
}