#!/usr/sbin/dtrace -s #pragma D option quiet #pragma D option defaultargs #pragma D option destructive /* * Usage: * rtgc.d -p JAVA_PID */ :::BEGIN / $1 == "" / { system("rm vm.paused.%d", $target); } jrts$target:::rtgc-cycle-begin { printf("%d : RTGC cycle begins\n",timestamp); } jrts$target:::rtgc-cycle-end { printf("%d : RTGC cycle ends\n",timestamp); } jrts$target:::rtgc-change-priority { printf("%d : RTGC's priority changed to %d\n",timestamp,arg0); } jrts$target:::rtgc-worker-thread-start { printf("%d : RTGC worker thread starts\n",timestamp); } jrts$target:::rtgc-worker-thread-stop { printf("%d : RTGC worker thread stops\n",timestamp); }