Sha256: e53780018367bba267bf7b03e575b109632be1730cf05efe95f680a5d9600e72

Contents?: true

Size: 723 Bytes

Versions: 2

Compression:

Stored size: 723 Bytes

Contents

#!/usr/sbin/dtrace -s
/* https://raw.github.com/MacRuby/MacRuby/master/sample-macruby/DTrace/methods_duration.d */
#pragma D option quiet

BEGIN
{
    printf("Target pid: %d\n\n", $target);
    printf("%20s %-5s %10s %-30s %10s\n", "FILE", "LINE", "CLASS", "METHOD",
	    "DURATION");
    printf("--------------------------------------------------------------------------------\n");
}

macruby$target:::method-entry
/copyinstr(arg0) != "TopLevel"/
{
    self->starttime = walltimestamp / 1000;
}

macruby$target:::method-return
/copyinstr(arg0) != "TopLevel"/
{
    printf("%20s:%-5d %10s#%-30s %10d\n", copyinstr(arg2), arg3,
            copyinstr(arg0), copyinstr(arg1),
	    (walltimestamp / 1000) - self->starttime);
}

Version data entries

2 entries across 2 versions & 1 rubygems

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