tst.schrock.ksh revision 14ea49401f3c8c61422aefbda43809e275f60c6c
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# CDDL HEADER START
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# The contents of this file are subject to the terms of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Common Development and Distribution License (the "License").
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# You may not use this file except in compliance with the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# See the License for the specific language governing permissions
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# and limitations under the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# When distributing Covered Code, include this CDDL HEADER in each
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# If applicable, add the following below this CDDL HEADER, with the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# CDDL HEADER END
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# Use is subject to license terms.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync#ident "%Z%%M% %I% %E% SMI"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncif [ $# != 1 ]; then
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# /usr/ccs/bin/nm execs a 64-bit version of itself. DTrace uses libproc
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# (which uses /proc) to find out when the traced process exits, but a
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# 32-bit process can't examine a 64-bit one with libproc. The
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync# LD_NOEXEC_64 variable prevents nm from re-execing itself.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncLD_NOEXEC_64=tomeeisrad $dtrace -F -s /dev/stdin -c \
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncpid\$target::\$1:entry
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync self->start = vtimestamp;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncpid\$target:::entry
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/self->start/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync trace(vtimestamp - self->start);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncpid\$target:::return
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/self->start/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync trace(vtimestamp - self->start);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncpid\$target::\$1:return
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/self->start/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync self->start = 0;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/self->start/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync trace(vtimestamp - self->start);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/self->start/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync trace(vtimestamp - self->start);