]> git.saurik.com Git - apple/xnu.git/blob - bsd/hfs/hfscommon/headers/HFSInstrumentation.h
5cdc2de2040f22b313326836e72ee57d99a40fd7
[apple/xnu.git] / bsd / hfs / hfscommon / headers / HFSInstrumentation.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 File: HFSInstrumentation.h
24
25 Contains: xxx put contents here xxx
26
27 Version: xxx put version here xxx
28
29 Copyright: © 1997 by Apple Computer, Inc., all rights reserved.
30
31 File Ownership:
32
33 DRI: xxx put dri here xxx
34
35 Other Contact: xxx put other contact here xxx
36
37 Technology: xxx put technology here xxx
38
39 Writers:
40
41 (DSH) Deric Horn
42 (djb) Don Brady
43
44 Change History (most recent first):
45
46 <CS6> 10/1/97 djb Add kGetCatalogIterator
47 <CS5> 9/4/97 djb Add kTraceRelString, kHeuristicHint.
48 <CS4> 7/24/97 djb Add summary traces for GetNode, RelNode, and BasicIO.
49 <CS3> 7/21/97 djb Redefine LogStartTime/LogEndTime macros.
50 <CS2> 7/16/97 DSH FilesInternal.i renamed FileMgrInternal.i to avoid name
51 collision
52 <CS1> 5/9/97 djb first checked in
53 */
54
55 #include "../../hfs_macos_defs.h"
56 #include "FileMgrInternal.h"
57
58
59 //
60 // Instrumentation summary trace indicies
61 //
62 enum {
63 // Unicode routines
64 kTraceUnicodeToPString,
65 kTracePStringToUnicode,
66 kTraceUnicodeCompare,
67
68 kTraceRelString,
69
70 // B-tree routines
71 kTraceOpenBTree,
72 kTraceCloseBTree,
73 kTraceFlushBTree,
74 kTraceSearchBTree,
75 kTraceGetBTreeRecord,
76 kTraceInsertBTreeRecord,
77 kTraceDeleteBTreeRecord,
78 kTraceReplaceBTreeRecord,
79
80 // Misc routines
81 kTraceMapFileBlock,
82 kTraceBlockAllocate,
83
84 kTraceGetNode,
85 kTraceReleaseNode,
86 kTraceBasicIO,
87 kTraceFSRead,
88 kHeuristicHint,
89 kGetCatalogIterator,
90
91
92 kSummaryTraceRefs // number of summary trace references
93 };
94
95
96 void STLogStartTime(UInt32 selector);
97 void STLogEndTime(UInt32 selector, OSErr error);
98
99
100 /*
101 MACRO
102 LogStartTime(selector)
103
104 DESCRIPTION
105 If summary traces are enabled then LogStartTime will record the starting time for
106 the routine associated with the selector. Otherwise LogStartTime does nothing.
107
108 */
109
110 #if hasSummaryTraces
111
112 #define LogStartTime(selector) STLogStartTime( (selector) )
113
114 #else
115
116 #define LogStartTime(selector) ((void) 0)
117
118 #endif
119
120
121
122 /*
123 MACRO
124 LogEndTime(selector, error)
125
126 DESCRIPTION
127 If summary traces are enabled then InsLogEndTime will record the ending time for
128 the routine associated with the selector. Otherwise LogEndTime does nothing.
129
130 */
131
132 #if hasSummaryTraces
133
134 #define LogEndTime(selector,error) STLogEndTime( (selector), (error) )
135
136 #else
137
138 #define LogEndTime(selector,error) ((void) 0)
139
140 #endif