1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* Copyright (c) 1988 AT&T */ 23 /* All Rights Reserved */ 24 25 /* 26 * Copyright 2014 Garrett D'Amore <garrett@damore.org> 27 * 28 * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved. 29 * Use is subject to license terms. 30 */ 31 32 #ifndef _MON_H 33 #define _MON_H 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 /* 40 * Inclusion of <sys/types.h> will break SVID namespace, hence only 41 * the size_t type is defined in this header. 42 */ 43 #if !defined(_SIZE_T) || __cplusplus >= 199711L 44 #define _SIZE_T 45 #if defined(_LP64) || defined(_I32LPx) 46 typedef unsigned long size_t; /* size of something in bytes */ 47 #else 48 typedef unsigned int size_t; /* (historical version) */ 49 #endif 50 #endif /* _SIZE_T */ 51 52 struct hdr { 53 char *lpc; 54 char *hpc; 55 size_t nfns; 56 }; 57 58 struct cnt { 59 char *fnpc; 60 long mcnt; 61 }; 62 63 typedef unsigned short WORD; 64 65 #define MON_OUT "mon.out" 66 #define MPROGS0 (150 * sizeof (WORD)) /* 300 for pdp11, 600 for 32-bits */ 67 #define MSCALE0 4 68 69 #ifndef NULL 70 #if defined(_LP64) 71 #define NULL 0L 72 #else 73 #define NULL 0 74 #endif 75 #endif 76 77 extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t); 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif /* _MON_H */ 84