#!/usr/sbin/dtrace -s #pragma D option quiet #pragma D option defaultargs #pragma D option destructive /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing * permissions and limitations under the License. * * When distributing Covered Code, include this CDDL * HEADER in each file and include the License file at * usr/src/OPENSOLARIS.LICENSE. If applicable, * add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] * * CDDL HEADER END * * Copyright © 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * */ /* * Usage: * schedulables.d -p JAVA_PID */ :::BEGIN { system("rm vm.paused.%d", $target); } jrts$target:::priority-change / arg1 == 1 / { printf("%d : Thread %d is changing thread %d's priority to %d\n", timestamp,curthread->t_tid,arg0,arg2); } jrts$target:::priority-change /arg1 == 2 / { printf("%d : Thread %d is changing handler %p's priority to %d\n", timestamp,curthread->t_tid,arg0,arg2); } jrts$target:::priority-boost { printf("%d : Thread %d is boosting thread %d to priority %d because of lock %p\n", timestamp, curthread->t_tid,arg0,arg1,arg2); } jrts$target:::priority-unboost { printf("%d : Thread %d is unboosting thread %d to priority %d\n", timestamp,curthread->t_tid,arg0,arg1); } jrts$target:::monitor-contended-enter { printf("%d : Thread %d is trying to enter contended monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); } jrts$target:::monitor-contended-entered { printf("%d : Thread %d is entering contended monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); } jrts$target:::monitor-contended-exit { printf("%d : Thread %d is exiting contended monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); } jrts$target:::monitor-wait { printf("%d : Thread %d is calling wait on monitor %p from class %s for %d milliseconds and %d nanoseconds\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2), arg3,arg4); } jrts$target:::monitor-waited { printf("%d : Thread %d is completing its wait on monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); } jrts$target:::monitor-notify { printf("%d : Thread %d is calling notify() on monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); } jrts$target:::monitor-notifyAll { printf("%d : Thread %d is calling notifyAll() on monitor %p from class %s\n", timestamp,curthread->t_tid,arg0,copyinstr(arg1,arg2)); }