1*3944Sahl /* 2*3944Sahl * CDDL HEADER START 3*3944Sahl * 4*3944Sahl * The contents of this file are subject to the terms of the 5*3944Sahl * Common Development and Distribution License (the "License"). 6*3944Sahl * You may not use this file except in compliance with the License. 7*3944Sahl * 8*3944Sahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3944Sahl * or http://www.opensolaris.org/os/licensing. 10*3944Sahl * See the License for the specific language governing permissions 11*3944Sahl * and limitations under the License. 12*3944Sahl * 13*3944Sahl * When distributing Covered Code, include this CDDL HEADER in each 14*3944Sahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3944Sahl * If applicable, add the following below this CDDL HEADER, with the 16*3944Sahl * fields enclosed by brackets "[]" replaced with your own identifying 17*3944Sahl * information: Portions Copyright [yyyy] [name of copyright owner] 18*3944Sahl * 19*3944Sahl * CDDL HEADER END 20*3944Sahl */ 21*3944Sahl 22*3944Sahl /* 23*3944Sahl * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24*3944Sahl * Use is subject to license terms. 25*3944Sahl */ 26*3944Sahl 27*3944Sahl #pragma ident "%Z%%M% %I% %E% SMI" 28*3944Sahl 29*3944Sahl /* 30*3944Sahl * ASSERTION: Trace all instructions in the function 'test' to verify that 31*3944Sahl * the branches are emulated correctly. 32*3944Sahl */ 33*3944Sahl 34*3944Sahl #pragma D option destructive 35*3944Sahl #pragma D option quiet 36*3944Sahl 37*3944Sahl pid$1:a.out:waiting:entry 38*3944Sahl { 39*3944Sahl this->a = (char *)alloca(1); 40*3944Sahl *this->a = 1; 41*3944Sahl copyout(this->a, arg0, 1); 42*3944Sahl } 43*3944Sahl 44*3944Sahl pid$1:a.out:test: 45*3944Sahl { 46*3944Sahl printf("%s:%s\n", probefunc, probename); 47*3944Sahl } 48*3944Sahl 49*3944Sahl syscall::rexit:entry 50*3944Sahl /pid == $1/ 51*3944Sahl { 52*3944Sahl exit(0); 53*3944Sahl } 54*3944Sahl 55*3944Sahl 56*3944Sahl BEGIN 57*3944Sahl { 58*3944Sahl /* 59*3944Sahl * Let's just do this for 5 seconds. 60*3944Sahl */ 61*3944Sahl timeout = timestamp + 5000000000; 62*3944Sahl } 63*3944Sahl 64*3944Sahl profile:::tick-4 65*3944Sahl /timestamp > timeout/ 66*3944Sahl { 67*3944Sahl trace("test timed out"); 68*3944Sahl exit(1); 69*3944Sahl } 70*3944Sahl 71