Sha256: 6f752422fc34211505acab45783d9d521e96162babdc01af2851f08d1993e08e

Contents?: true

Size: 613 Bytes

Versions: 1

Compression:

Stored size: 613 Bytes

Contents

#!/usr/sbin/dtrace -s 
#pragma D option quiet

/*
 * Trace all the custom ruby probes defined in your application
 * using XRay::DTrace, Apple's DTracer or Joyent's Tracer module.
 *
 * Usage:
 *
 *     sudo /usr/bin/xray_trace_all_custom_ruby_probes.d -p <a pid>
 *
 *     sudo /usr/bin/xray_trace_all_custom_ruby_probes.d -c "ruby -v"
 *
 *     sudo dtrace -s /usr/bin/xray_trace_all_custom_ruby_probes.d -p <a pid>
 */

dtrace:::BEGIN
{
    printf("Tracing... Hit Ctrl-C to end.\n");
}

ruby$target:::ruby-probe
{
	printf("=> %d == cpu: %2d == %15s '%s'\n", timestamp, cpu, copyinstr(arg0), copyinstr(arg1))
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xray-1.1 bin/xray_trace_all_custom_ruby_probes.d