1*7e3dbbacSRobert Mustacchi /* 2*7e3dbbacSRobert Mustacchi * CDDL HEADER START 3*7e3dbbacSRobert Mustacchi * 4*7e3dbbacSRobert Mustacchi * The contents of this file are subject to the terms of the 5*7e3dbbacSRobert Mustacchi * Common Development and Distribution License (the "License"). 6*7e3dbbacSRobert Mustacchi * You may not use this file except in compliance with the License. 7*7e3dbbacSRobert Mustacchi * 8*7e3dbbacSRobert Mustacchi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7e3dbbacSRobert Mustacchi * or http://www.opensolaris.org/os/licensing. 10*7e3dbbacSRobert Mustacchi * See the License for the specific language governing permissions 11*7e3dbbacSRobert Mustacchi * and limitations under the License. 12*7e3dbbacSRobert Mustacchi * 13*7e3dbbacSRobert Mustacchi * When distributing Covered Code, include this CDDL HEADER in each 14*7e3dbbacSRobert Mustacchi * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7e3dbbacSRobert Mustacchi * If applicable, add the following below this CDDL HEADER, with the 16*7e3dbbacSRobert Mustacchi * fields enclosed by brackets "[]" replaced with your own identifying 17*7e3dbbacSRobert Mustacchi * information: Portions Copyright [yyyy] [name of copyright owner] 18*7e3dbbacSRobert Mustacchi * 19*7e3dbbacSRobert Mustacchi * CDDL HEADER END 20*7e3dbbacSRobert Mustacchi */ 21*7e3dbbacSRobert Mustacchi /* 22*7e3dbbacSRobert Mustacchi * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 23*7e3dbbacSRobert Mustacchi * Copyright 2018 Joyent, Inc. 24*7e3dbbacSRobert Mustacchi */ 25*7e3dbbacSRobert Mustacchi 26*7e3dbbacSRobert Mustacchi /* 27*7e3dbbacSRobert Mustacchi * This file contains preset event names from the Performance Application 28*7e3dbbacSRobert Mustacchi * Programming Interface v3.5 which included the following notice: 29*7e3dbbacSRobert Mustacchi * 30*7e3dbbacSRobert Mustacchi * Copyright (c) 2005,6 31*7e3dbbacSRobert Mustacchi * Innovative Computing Labs 32*7e3dbbacSRobert Mustacchi * Computer Science Department, 33*7e3dbbacSRobert Mustacchi * University of Tennessee, 34*7e3dbbacSRobert Mustacchi * Knoxville, TN. 35*7e3dbbacSRobert Mustacchi * All Rights Reserved. 36*7e3dbbacSRobert Mustacchi * 37*7e3dbbacSRobert Mustacchi * 38*7e3dbbacSRobert Mustacchi * Redistribution and use in source and binary forms, with or without 39*7e3dbbacSRobert Mustacchi * modification, are permitted provided that the following conditions are met: 40*7e3dbbacSRobert Mustacchi * 41*7e3dbbacSRobert Mustacchi * * Redistributions of source code must retain the above copyright notice, 42*7e3dbbacSRobert Mustacchi * this list of conditions and the following disclaimer. 43*7e3dbbacSRobert Mustacchi * * Redistributions in binary form must reproduce the above copyright 44*7e3dbbacSRobert Mustacchi * notice, this list of conditions and the following disclaimer in the 45*7e3dbbacSRobert Mustacchi * documentation and/or other materials provided with the distribution. 46*7e3dbbacSRobert Mustacchi * * Neither the name of the University of Tennessee nor the names of its 47*7e3dbbacSRobert Mustacchi * contributors may be used to endorse or promote products derived from 48*7e3dbbacSRobert Mustacchi * this software without specific prior written permission. 49*7e3dbbacSRobert Mustacchi * 50*7e3dbbacSRobert Mustacchi * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 51*7e3dbbacSRobert Mustacchi * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 52*7e3dbbacSRobert Mustacchi * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 53*7e3dbbacSRobert Mustacchi * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 54*7e3dbbacSRobert Mustacchi * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 55*7e3dbbacSRobert Mustacchi * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 56*7e3dbbacSRobert Mustacchi * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 57*7e3dbbacSRobert Mustacchi * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 58*7e3dbbacSRobert Mustacchi * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 59*7e3dbbacSRobert Mustacchi * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 60*7e3dbbacSRobert Mustacchi * POSSIBILITY OF SUCH DAMAGE. 61*7e3dbbacSRobert Mustacchi * 62*7e3dbbacSRobert Mustacchi * 63*7e3dbbacSRobert Mustacchi * This open source software license conforms to the BSD License template. 64*7e3dbbacSRobert Mustacchi */ 65*7e3dbbacSRobert Mustacchi 66*7e3dbbacSRobert Mustacchi 67*7e3dbbacSRobert Mustacchi #ifndef _CORE_PCBE_TABLE_H 68*7e3dbbacSRobert Mustacchi #define _CORE_PCBE_TABLE_H 69*7e3dbbacSRobert Mustacchi 70*7e3dbbacSRobert Mustacchi /* 71*7e3dbbacSRobert Mustacchi * Structure definition for PCBE events. 72*7e3dbbacSRobert Mustacchi */ 73*7e3dbbacSRobert Mustacchi 74*7e3dbbacSRobert Mustacchi #ifdef __cplusplus 75*7e3dbbacSRobert Mustacchi extern "C" { 76*7e3dbbacSRobert Mustacchi #endif 77*7e3dbbacSRobert Mustacchi 78*7e3dbbacSRobert Mustacchi #include <sys/types.h> 79*7e3dbbacSRobert Mustacchi 80*7e3dbbacSRobert Mustacchi struct events_table_t { 81*7e3dbbacSRobert Mustacchi uint8_t eventselect; 82*7e3dbbacSRobert Mustacchi uint8_t unitmask; 83*7e3dbbacSRobert Mustacchi uint64_t supported_counters; 84*7e3dbbacSRobert Mustacchi const char *name; 85*7e3dbbacSRobert Mustacchi }; 86*7e3dbbacSRobert Mustacchi 87*7e3dbbacSRobert Mustacchi /* Used to describe which counters support an event */ 88*7e3dbbacSRobert Mustacchi #define C(x) (1 << (x)) 89*7e3dbbacSRobert Mustacchi #define C0 C(0) 90*7e3dbbacSRobert Mustacchi #define C1 C(1) 91*7e3dbbacSRobert Mustacchi #define C2 C(2) 92*7e3dbbacSRobert Mustacchi #define C3 C(3) 93*7e3dbbacSRobert Mustacchi #define C_ALL 0xFFFFFFFFFFFFFFFF 94*7e3dbbacSRobert Mustacchi 95*7e3dbbacSRobert Mustacchi #define NT_END 0xFF 96*7e3dbbacSRobert Mustacchi 97*7e3dbbacSRobert Mustacchi #ifdef __cplusplus 98*7e3dbbacSRobert Mustacchi } 99*7e3dbbacSRobert Mustacchi #endif 100*7e3dbbacSRobert Mustacchi 101*7e3dbbacSRobert Mustacchi #endif /* _CORE_PCBE_TABLE_H */ 102