xref: /titanic_41/usr/src/head/mon.h (revision ac88567a7a5bb7f01cf22cf366bc9d6203e24d7a)
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 /*
27  * Copyright 1997-2003 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 #ifndef _MON_H
32 #define	_MON_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * Inclusion of <sys/types.h> will break SVID namespace, hence only
42  * the size_t type is defined in this header.
43  */
44 #if !defined(_SIZE_T) || __cplusplus >= 199711L
45 #define	_SIZE_T
46 #if defined(_LP64) || defined(_I32LPx)
47 typedef unsigned long size_t;	/* size of something in bytes */
48 #else
49 typedef unsigned int  size_t;	/* (historical version) */
50 #endif
51 #endif  /* _SIZE_T */
52 
53 struct hdr {
54 	char	*lpc;
55 	char	*hpc;
56 	size_t	nfns;
57 };
58 
59 struct cnt {
60 	char	*fnpc;
61 	long	mcnt;
62 };
63 
64 typedef unsigned short WORD;
65 
66 #define	MON_OUT	"mon.out"
67 #define	MPROGS0	(150 * sizeof (WORD))	/* 300 for pdp11, 600 for 32-bits */
68 #define	MSCALE0	4
69 
70 #ifndef NULL
71 #if defined(_LP64)
72 #define	NULL	0L
73 #else
74 #define	NULL	0
75 #endif
76 #endif
77 
78 #if defined(__STDC__)
79 extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t);
80 #else
81 extern void monitor();
82 #endif
83 
84 #ifdef	__cplusplus
85 }
86 #endif
87 
88 #endif	/* _MON_H */
89