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# ident "%Z%%M% %I% %E% SMI" 27*3944Sahl 28*3944Sahlif [ $# != 1 ]; then 29*3944Sahl echo expected one argument: '<'dtrace-path'>' 30*3944Sahl exit 2 31*3944Sahlfi 32*3944Sahl 33*3944Sahldtrace=$1 34*3944Sahl 35*3944Sahl# The output files assumes the timezone is US/Pacific 36*3944SahlTZ=US/Pacific 37*3944Sahl 38*3944Sahl$dtrace -s /dev/stdin <<EOF 39*3944Sahl#pragma D option quiet 40*3944Sahl 41*3944Sahlinline uint64_t NANOSEC = 1000000000; 42*3944Sahl 43*3944SahlBEGIN 44*3944Sahl{ 45*3944Sahl printf("%T\n%T\n%T", (uint64_t)0, (uint64_t)1062609821 * NANOSEC, 46*3944Sahl (uint64_t)0x7fffffff * NANOSEC); 47*3944Sahl exit(0); 48*3944Sahl} 49*3944SahlEOF 50*3944Sahl 51*3944Sahlif [ $? -ne 0 ]; then 52*3944Sahl print -u2 "dtrace failed" 53*3944Sahl exit 1 54*3944Sahlfi 55*3944Sahl 56*3944Sahlexit 0 57