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