usr/src/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh
author Adam H. Leventhal <ahl@delphix.com>
Wed, 25 Jul 2012 19:05:31 -0400
changeset 13758 23432da34147
permissions -rw-r--r--
3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider Reviewed by: Bryan Cantrill <[email protected]> Reviewed by: Eric Schrock <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Approved by: Garrett D'Amore <[email protected]>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13758
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     1
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     2
# CDDL HEADER START
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     3
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     7
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    11
# and limitations under the License.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    12
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    18
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    19
# CDDL HEADER END
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    20
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    21
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    22
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    23
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    24
# Use is subject to license terms.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    25
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    26
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    27
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    28
# Copyright (c) 2012 by Delphix. All rights reserved.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    29
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    30
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    31
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    32
# Test the output of unstable translations.
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    33
#
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    34
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    35
if [ $# != 1 ]; then
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    36
	echo expected one argument: '<'dtrace-path'>'
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    37
	exit 2
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    38
fi
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    39
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    40
dtrace=$1
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    41
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    42
$dtrace -v -s /dev/stdin <<EOF
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    43
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    44
#pragma D option quiet
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    45
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    46
inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread);
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    47
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    48
BEGIN
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    49
{
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    50
	this->a = myinfo->pr_flag;
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    51
	exit(0);
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    52
}
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    53
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    54
BEGIN
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    55
{
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    56
	exit(1);
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    57
}
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    58
EOF
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    59
23432da34147 3021 option for time-ordered output from dtrace(1M)
Adam H. Leventhal <ahl@delphix.com>
parents:
diff changeset
    60
exit $?