6e0bee749e9081c846d305caa233c222da771831jhaslam# CDDL HEADER START
6e0bee749e9081c846d305caa233c222da771831jhaslam# The contents of this file are subject to the terms of the
6e0bee749e9081c846d305caa233c222da771831jhaslam# Common Development and Distribution License (the "License").
6e0bee749e9081c846d305caa233c222da771831jhaslam# You may not use this file except in compliance with the License.
6e0bee749e9081c846d305caa233c222da771831jhaslam# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6e0bee749e9081c846d305caa233c222da771831jhaslam# See the License for the specific language governing permissions
6e0bee749e9081c846d305caa233c222da771831jhaslam# and limitations under the License.
6e0bee749e9081c846d305caa233c222da771831jhaslam# When distributing Covered Code, include this CDDL HEADER in each
6e0bee749e9081c846d305caa233c222da771831jhaslam# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6e0bee749e9081c846d305caa233c222da771831jhaslam# If applicable, add the following below this CDDL HEADER, with the
6e0bee749e9081c846d305caa233c222da771831jhaslam# fields enclosed by brackets "[]" replaced with your own identifying
6e0bee749e9081c846d305caa233c222da771831jhaslam# information: Portions Copyright [yyyy] [name of copyright owner]
6e0bee749e9081c846d305caa233c222da771831jhaslam# CDDL HEADER END
6e0bee749e9081c846d305caa233c222da771831jhaslam# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
6e0bee749e9081c846d305caa233c222da771831jhaslam# Use is subject to license terms.
6e0bee749e9081c846d305caa233c222da771831jhaslam# This test verifies that a regex in the provider name will match
6e0bee749e9081c846d305caa233c222da771831jhaslam# USDT probes as well as pid probes (e.g., p*d$target matches both
6e0bee749e9081c846d305caa233c222da771831jhaslam# pid$target and pyramid$target.)
6e0bee749e9081c846d305caa233c222da771831jhaslamif [ $# != 1 ]; then
6e0bee749e9081c846d305caa233c222da771831jhaslammain: main.o prov.o
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi gcc -m32 -o main main.o prov.o
6e0bee749e9081c846d305caa233c222da771831jhaslammain.o: main.c prov.h
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi gcc -m32 -c main.c
6e0bee749e9081c846d305caa233c222da771831jhaslamprov.h: prov.d
6e0bee749e9081c846d305caa233c222da771831jhaslam $dtrace -h -s prov.d
6e0bee749e9081c846d305caa233c222da771831jhaslamprov.o: prov.d main.o
6e0bee749e9081c846d305caa233c222da771831jhaslam $dtrace -G -32 -s prov.d main.o
6e0bee749e9081c846d305caa233c222da771831jhaslamprovider pyramid {
6e0bee749e9081c846d305caa233c222da771831jhaslam probe entry();
6e0bee749e9081c846d305caa233c222da771831jhaslam#include <sys/sdt.h>
6e0bee749e9081c846d305caa233c222da771831jhaslam#include "prov.h"
6e0bee749e9081c846d305caa233c222da771831jhaslammain(int argc, char **argv)
6e0bee749e9081c846d305caa233c222da771831jhaslam PYRAMID_ENTRY();
6e0bee749e9081c846d305caa233c222da771831jhaslam printf("%s:%s:%s\n", probemod, probefunc, probename);
6e0bee749e9081c846d305caa233c222da771831jhaslam $dtrace -q -s ./main.d -c ./main