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