8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sgs / include / monv.h
blob1f3831c9f2f47a85e731348b93e7d6ae23593f1a
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright (c) 1998 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _MONV_H
28 #define _MONV_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * Versioned monitor file
35 * Since this is not really a *shared* file between the compilers and OS
36 * (each hold a separate copy), care must be taken to see that it is in
37 * in sync with the compiler version.
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
45 * General object structure
47 #ifndef PROF_TYPES_PREDEFINED
48 typedef unsigned long long Index;
49 typedef unsigned long long Address;
50 typedef unsigned long long Size;
51 #endif
53 typedef struct _prof_object {
54 unsigned int type;
55 unsigned int version;
56 Size size;
57 } ProfObject;
60 #define PROF_MAGIC 0x50524F46 /* "PROF" */
61 #define PROF_MAJOR_VERSION 1
62 #define PROF_MINOR_VERSION 0
64 typedef struct _prof_header {
65 unsigned int h_magic;
66 unsigned short h_major_ver;
67 unsigned short h_minor_ver;
68 Size size;
69 } ProfHeader;
72 * Object types
74 #define PROF_DUMMY_T -1 /* to be ignored by gprof */
75 #define PROF_BUFFER_T 1
76 #define PROF_CALLGRAPH_T 2
77 #define PROF_MODULES_T 3
80 * Object version numbers
82 #define PROF_BUFFER_VER 1
83 #define PROF_CALLGRAPH_VER 1
84 #define PROF_MODULES_VER 1
87 * Actual number of pcsample elements that can be held in 1Mb with
88 * the size of (Address) equal to 8
90 #define PROF_BUFFER_SIZE 131072 /* 1 Mb */
92 typedef struct _prof_buffer {
93 unsigned int type; /* PROF_BUFFER_T */
94 unsigned int version; /* 1 */
95 Size size;
96 Index buffer;
97 Size bufsize;
98 } ProfBuffer;
100 typedef struct _prof_call_graph {
101 unsigned int type; /* PROF_CALLGRAPH_T */
102 unsigned int version; /* 1 */
103 Size size;
104 Index functions;
105 } ProfCallGraph;
107 typedef struct _prof_module_list {
108 unsigned int type; /* PROF_MODULES_T */
109 unsigned int version; /* 1 */
110 Size size;
111 Index modules;
112 } ProfModuleList;
114 typedef struct _prof_module {
115 Index next;
116 Index path;
117 Address startaddr;
118 Address endaddr;
119 } ProfModule;
121 typedef struct _prof_function {
122 Index next_to;
123 Index next_from;
124 Address frompc;
125 Address topc;
126 unsigned long long count;
127 Index next_hash;
128 } ProfFunction;
130 #ifdef __cplusplus
132 #endif
134 #endif /* _MONV_H */