/* * rb_objcpu-type.d - measure Ruby Object create on-CPU time, broken down by * Ruby Object type. * * This example script is based off js_objcpu.d from the * helper monkey javascript package written by Brenden Gregg. */ #pragma D option quiet BEGIN { printf("Tracing... Hit Ctrl-C to end.\n"); } ruby$target:::object-create-start { self->vstart = vtimestamp; } ruby$target:::object-create-done /self->vstart/ { this->oncpu = vtimestamp - self->vstart; @dist[copyinstr(arg0)] = quantize(this->oncpu); self->vstart = 0; }