Annotation of src/usr.bin/make/stats.h, Revision 1.4
1.2 espie 1: #ifndef STAT_H
2: #define STAT_H
1.1 espie 3: /* $OpenPackages$ */
1.4 ! espie 4: /* $OpenBSD: stats.h,v 1.3 2001/06/12 22:44:22 espie Exp $ */
1.1 espie 5:
6: /*
7: * Copyright (c) 1999 Marc Espie.
8: *
9: * Code written for the OpenBSD project.
10: *
11: * Redistribution and use in source and binary forms, with or without
12: * modification, are permitted provided that the following conditions
13: * are met:
14: * 1. Redistributions of source code must retain the above copyright
15: * notice, this list of conditions and the following disclaimer.
16: * 2. Redistributions in binary form must reproduce the above copyright
17: * notice, this list of conditions and the following disclaimer in the
18: * documentation and/or other materials provided with the distribution.
19: *
20: * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
21: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
24: * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31: */
32:
33: /* statistical information gathering */
34:
35: #if defined(STATS_VAR_LOOKUP) || \
36: defined(STATS_GN_CREATION) || \
37: defined(STATS_BUF) || \
1.3 espie 38: defined(STATS_HASH) || \
1.4 ! espie 39: defined(STATS_GROW) || \
! 40: defined(STATS_SUFF)
1.1 espie 41: #define HAS_STATS
42: #endif
43:
44: #ifdef HAS_STATS
1.2 espie 45: extern void Init_Stats(void);
46:
1.1 espie 47: extern unsigned long *statarray;
48: #define STAT_INVOCATIONS statarray[0]
49: #define STAT_VAR_SEARCHES statarray[1]
50: #define STAT_VAR_COUNT statarray[2]
51: #define STAT_VAR_MAXCOUNT statarray[3]
52: #define STAT_GN_COUNT statarray[4]
53: #define STAT_TOTAL_BUFS statarray[5]
54: #define STAT_DEFAULT_BUFS statarray[6]
55: #define STAT_WEIRD_BUFS statarray[7]
56: #define STAT_BUFS_EXPANSION statarray[8]
57: #define STAT_WEIRD_INEFFICIENT statarray[9]
58: #define STAT_VAR_HASH_CREATION statarray[10]
59: #define STAT_VAR_FROM_ENV statarray[11]
60: #define STAT_VAR_CREATION statarray[12]
61: #define STAT_VAR_FIND statarray[13]
62: #define STAT_HASH_CREATION statarray[14]
63: #define STAT_HASH_ENTRIES statarray[15]
64: #define STAT_HASH_EXPAND statarray[16]
65: #define STAT_HASH_LOOKUP statarray[17]
66: #define STAT_HASH_LENGTH statarray[18]
67: #define STAT_HASH_SIZE statarray[19]
68: #define STAT_HASH_POSITIVE statarray[20]
69: #define STAT_USER_SECONDS statarray[21]
70: #define STAT_USER_MS statarray[22]
71: #define STAT_SYS_SECONDS statarray[23]
72: #define STAT_SYS_MS statarray[24]
73: #define STAT_VAR_HASH_MAXSIZE statarray[25]
74: #define STAT_VAR_GHASH_MAXSIZE statarray[26]
75: #define STAT_VAR_POWER statarray[27]
1.3 espie 76: #define STAT_GROWARRAY statarray[28]
1.4 ! espie 77: #define STAT_SUFF_LOOKUP_NAME statarray[29]
! 78: #define STAT_TRANSFORM_LOOKUP_NAME statarray[30]
1.1 espie 79:
1.4 ! espie 80: #define STAT_NUMBER 32
1.1 espie 81:
1.2 espie 82: #else
83: #define Init_Stats()
1.1 espie 84: #endif
85:
1.2 espie 86: #endif