Commit Graph

2 Commits

Author SHA1 Message Date
Michael Gottesman
3503cce105 Add support for gathering dtrace statistics on calls to isUniquelyReferenced.
Swift SVN r25273
2015-02-13 17:03:36 +00:00
Michael Gottesman
6ff94330ae Add SwiftRuntime dtrace provider with probes for retain, release, allocateObject, deallocateObject.
Now if you want to get these dynamic metrics from the runtime all you
need to do is:

1. Configure Swift with -DSWIFT_RUNTIME_ENABLE_DTRACE=YES
2. Run your routine with the command:

sudo dtrace -s ./utils/runtime_statistics.d -c "$MY_COMMAND_LINE"

After your app finishes running, it will dump out the counts. This is a
much more efficient and low maintenance way to get such statistics than
custom instrumenting the code.

Nothing is changed if -DSWIFT_RUNTIME_ENABLE_DTRACE is not set.

Swift SVN r25264
2015-02-13 06:42:37 +00:00