1210753Srpaulo/*
2210753Srpaulo * CDDL HEADER START
3210753Srpaulo *
4210753Srpaulo * The contents of this file are subject to the terms of the
5210753Srpaulo * Common Development and Distribution License (the "License").
6210753Srpaulo * You may not use this file except in compliance with the License.
7210753Srpaulo *
8210753Srpaulo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9210753Srpaulo * or http://www.opensolaris.org/os/licensing.
10210753Srpaulo * See the License for the specific language governing permissions
11210753Srpaulo * and limitations under the License.
12210753Srpaulo *
13210753Srpaulo * When distributing Covered Code, include this CDDL HEADER in each
14210753Srpaulo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15210753Srpaulo * If applicable, add the following below this CDDL HEADER, with the
16210753Srpaulo * fields enclosed by brackets "[]" replaced with your own identifying
17210753Srpaulo * information: Portions Copyright [yyyy] [name of copyright owner]
18210753Srpaulo *
19210753Srpaulo * CDDL HEADER END
20210753Srpaulo */
21210753Srpaulo/*
22210753Srpaulo * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23210753Srpaulo * Use is subject to license terms.
24210753Srpaulo */
25210753Srpaulo
26210753Srpaulo/*
27210753Srpaulo * Test that we can successfully enable a probe using a generic event.
28210753Srpaulo * Currently, all platforms implement 'PAPI_tot_ins' so we'll use that.
29210753Srpaulo * Note that this test will fail if the system under test does not
30210753Srpaulo * implement that event.
31210753Srpaulo *
32210753Srpaulo * This test will fail if:
33210753Srpaulo *	1) The system under test does not define the 'PAPI_tot_ins' event.
34210753Srpaulo */
35210753Srpaulo
36210753Srpaulo#pragma D option quiet
37210753Srpaulo#pragma D option bufsize=128k
38210753Srpaulo
39210753Srpaulocpc:::PAPI_tot_ins-all-10000
40210753Srpaulo{
41210753Srpaulo	@[probename] = count();
42210753Srpaulo}
43210753Srpaulo
44210753Srpaulotick-1s
45210753Srpaulo/n++ > 10/
46210753Srpaulo{
47210753Srpaulo	exit(0);
48210753Srpaulo}
49