tst.static2.ksh revision 9512fe850e98fdd448c638ca63fdd92a8a510255
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Rebuilding an object file containing DOF changes slightly when the object
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# files containing the probes have already been modified. This tests that
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# case by generating the DOF object, removing it, and building it again.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#include <unistd.h>
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#include <sys/sdt.h>
9512fe850e98fdd448c638ca63fdd92a8a510255ahlstatic void
9512fe850e98fdd448c638ca63fdd92a8a510255ahl DTRACE_PROBE(test_prov, probe1);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl DTRACE_PROBE(test_prov, probe2);
9512fe850e98fdd448c638ca63fdd92a8a510255ahlmain(int argc, char **argv)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl DTRACE_PROBE(test_prov, probe1);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl DTRACE_PROBE(test_prov, probe2);
9512fe850e98fdd448c638ca63fdd92a8a510255ahlprovider test_prov {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl probe probe1();
9512fe850e98fdd448c638ca63fdd92a8a510255ahl probe probe2();
9512fe850e98fdd448c638ca63fdd92a8a510255ahl test_prov\$target:::
9512fe850e98fdd448c638ca63fdd92a8a510255ahl printf("%s:%s:%s\n", probemod, probefunc, probename);