Sha256: 86b7885f47b5171393de5ce1e542d93e0d1875143b5481c5716a9eccf415474e

Contents?: true

Size: 668 Bytes

Versions: 2

Compression:

Stored size: 668 Bytes

Contents

#!/usr/sbin/dtrace -s
/* https://raw.github.com/MacRuby/MacRuby/master/sample-macruby/DTrace/methods_count.d */

#pragma D option quiet

BEGIN
{
    printf("Target pid: %d\n\n", $target);
}

macruby$target:::method-entry
/copyinstr(arg0) != "TopLevel"/
{
/*    printf("%30s:%-5d %s#%s\n", copyinstr(arg2), arg3, 
	    copyinstr(arg0), copyinstr(arg1));
*/
    @methods_count[copyinstr(arg0), copyinstr(arg1)] = count();
}

END
{
    printf("\n");
    printf("%30s       %-30s  %s\n", "CLASS", "METHOD", "COUNT");
    printf("--------------------------------------------------------------------------------\n");
    printa("%30s       %-30s  %@d\n", @methods_count);
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion-dtrace-0.1.1 dtrace/methods_count.d
motion-dtrace-0.1.0 dtrace/methods_count.d