1*1670a1c2SRui Paulo /* 2*1670a1c2SRui Paulo * CDDL HEADER START 3*1670a1c2SRui Paulo * 4*1670a1c2SRui Paulo * The contents of this file are subject to the terms of the 5*1670a1c2SRui Paulo * Common Development and Distribution License (the "License"). 6*1670a1c2SRui Paulo * You may not use this file except in compliance with the License. 7*1670a1c2SRui Paulo * 8*1670a1c2SRui Paulo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*1670a1c2SRui Paulo * or http://www.opensolaris.org/os/licensing. 10*1670a1c2SRui Paulo * See the License for the specific language governing permissions 11*1670a1c2SRui Paulo * and limitations under the License. 12*1670a1c2SRui Paulo * 13*1670a1c2SRui Paulo * When distributing Covered Code, include this CDDL HEADER in each 14*1670a1c2SRui Paulo * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*1670a1c2SRui Paulo * If applicable, add the following below this CDDL HEADER, with the 16*1670a1c2SRui Paulo * fields enclosed by brackets "[]" replaced with your own identifying 17*1670a1c2SRui Paulo * information: Portions Copyright [yyyy] [name of copyright owner] 18*1670a1c2SRui Paulo * 19*1670a1c2SRui Paulo * CDDL HEADER END 20*1670a1c2SRui Paulo */ 21*1670a1c2SRui Paulo /* 22*1670a1c2SRui Paulo * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23*1670a1c2SRui Paulo * Use is subject to license terms. 24*1670a1c2SRui Paulo */ 25*1670a1c2SRui Paulo 26*1670a1c2SRui Paulo /* 27*1670a1c2SRui Paulo * Test that we can successfully enable a probe using a generic event. 28*1670a1c2SRui Paulo * Currently, all platforms implement 'PAPI_tot_ins' so we'll use that. 29*1670a1c2SRui Paulo * Note that this test will fail if the system under test does not 30*1670a1c2SRui Paulo * implement that event. 31*1670a1c2SRui Paulo * 32*1670a1c2SRui Paulo * This test will fail if: 33*1670a1c2SRui Paulo * 1) The system under test does not define the 'PAPI_tot_ins' event. 34*1670a1c2SRui Paulo */ 35*1670a1c2SRui Paulo 36*1670a1c2SRui Paulo #pragma D option quiet 37*1670a1c2SRui Paulo #pragma D option bufsize=128k 38*1670a1c2SRui Paulo 39*1670a1c2SRui Paulo cpc:::PAPI_tot_ins-all-10000 40*1670a1c2SRui Paulo { 41*1670a1c2SRui Paulo @[probename] = count(); 42*1670a1c2SRui Paulo } 43*1670a1c2SRui Paulo 44*1670a1c2SRui Paulo tick-1s 45*1670a1c2SRui Paulo /n++ > 10/ 46*1670a1c2SRui Paulo { 47*1670a1c2SRui Paulo exit(0); 48*1670a1c2SRui Paulo } 49