1210753Srpaulo# 2210753Srpaulo# CDDL HEADER START 3210753Srpaulo# 4210753Srpaulo# The contents of this file are subject to the terms of the 5210753Srpaulo# Common Development and Distribution License (the "License"). 6210753Srpaulo# You may not use this file except in compliance with the License. 7210753Srpaulo# 8210753Srpaulo# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9210753Srpaulo# or http://www.opensolaris.org/os/licensing. 10210753Srpaulo# See the License for the specific language governing permissions 11210753Srpaulo# and limitations under the License. 12210753Srpaulo# 13210753Srpaulo# When distributing Covered Code, include this CDDL HEADER in each 14210753Srpaulo# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15210753Srpaulo# If applicable, add the following below this CDDL HEADER, with the 16210753Srpaulo# fields enclosed by brackets "[]" replaced with your own identifying 17210753Srpaulo# information: Portions Copyright [yyyy] [name of copyright owner] 18210753Srpaulo# 19210753Srpaulo# CDDL HEADER END 20210753Srpaulo# 21210753Srpaulo 22210753Srpaulo# 23210753Srpaulo# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24210753Srpaulo# Use is subject to license terms. 25210753Srpaulo# 26210753Srpaulo# ident "%Z%%M% %I% %E% SMI" 27210753Srpaulo# 28210753Srpaulo 29210753Srpaulo# 30210753Srpaulo# ASSERTION: Sched probes should enable successfully. 31210753Srpaulo# 32210753Srpaulo 33210753Srpauloif [ $# != 1 ]; then 34210753Srpaulo echo expected one argument: '<'dtrace-path'>' 35210753Srpaulo exit 2 36210753Srpaulofi 37210753Srpaulo 38210753Srpaulo# 39210753Srpaulo# do not fail test in a domU 40210753Srpaulo# 41210753Srpauloif [ ! -c /dev/xen/privcmd ]; then 42210753Srpaulo exit 0 43210753Srpaulofi 44210753Srpaulo 45210753Srpaulodtrace=$1 46210753Srpaulo 47210753Srpauloscript() 48210753Srpaulo{ 49210753Srpaulo $dtrace -qs /dev/stdin <<EOF 50210753Srpaulo dtrace:::BEGIN 51210753Srpaulo { 52210753Srpaulo exit(0); 53210753Srpaulo } 54210753Srpaulo 55210753Srpaulo xdt:sched::off-cpu, 56210753Srpaulo xdt:sched::on-cpu, 57210753Srpaulo xdt:sched::idle-off-cpu, 58210753Srpaulo xdt:sched::idle-on-cpu, 59210753Srpaulo xdt:sched::block, 60210753Srpaulo xdt:sched::sleep, 61210753Srpaulo xdt:sched::wake, 62210753Srpaulo xdt:sched::yield, 63210753Srpaulo xdt:sched::shutdown-poweroff, 64210753Srpaulo xdt:sched::shutdown-reboot, 65210753Srpaulo xdt:sched::shutdown-suspend, 66210753Srpaulo xdt:sched::shutdown-crash 67210753Srpaulo {} 68210753SrpauloEOF 69210753Srpaulo} 70210753Srpaulo 71210753Srpauloscript 72210753Srpaulostatus=$? 73210753Srpaulo 74210753Srpauloexit $status 75