[BACK]Return to stats.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Annotation of src/usr.bin/make/stats.h, Revision 1.3

1.2       espie       1: #ifndef STAT_H
                      2: #define STAT_H
1.1       espie       3: /* $OpenPackages$ */
1.3     ! espie       4: /* $OpenBSD: stats.h,v 1.2 2001/05/23 12:34:49 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) || \
        !            39:        defined(STATS_GROW)
1.1       espie      40: #define HAS_STATS
                     41: #endif
                     42:
                     43: #ifdef HAS_STATS
1.2       espie      44: extern void Init_Stats(void);
                     45:
1.1       espie      46: extern unsigned long *statarray;
                     47: #define STAT_INVOCATIONS        statarray[0]
                     48: #define STAT_VAR_SEARCHES       statarray[1]
                     49: #define STAT_VAR_COUNT          statarray[2]
                     50: #define STAT_VAR_MAXCOUNT       statarray[3]
                     51: #define STAT_GN_COUNT           statarray[4]
                     52: #define STAT_TOTAL_BUFS         statarray[5]
                     53: #define STAT_DEFAULT_BUFS       statarray[6]
                     54: #define STAT_WEIRD_BUFS         statarray[7]
                     55: #define STAT_BUFS_EXPANSION     statarray[8]
                     56: #define STAT_WEIRD_INEFFICIENT  statarray[9]
                     57: #define STAT_VAR_HASH_CREATION statarray[10]
                     58: #define STAT_VAR_FROM_ENV      statarray[11]
                     59: #define STAT_VAR_CREATION      statarray[12]
                     60: #define STAT_VAR_FIND          statarray[13]
                     61: #define STAT_HASH_CREATION     statarray[14]
                     62: #define STAT_HASH_ENTRIES      statarray[15]
                     63: #define STAT_HASH_EXPAND       statarray[16]
                     64: #define STAT_HASH_LOOKUP       statarray[17]
                     65: #define STAT_HASH_LENGTH       statarray[18]
                     66: #define STAT_HASH_SIZE         statarray[19]
                     67: #define STAT_HASH_POSITIVE     statarray[20]
                     68: #define STAT_USER_SECONDS      statarray[21]
                     69: #define STAT_USER_MS           statarray[22]
                     70: #define STAT_SYS_SECONDS       statarray[23]
                     71: #define STAT_SYS_MS            statarray[24]
                     72: #define STAT_VAR_HASH_MAXSIZE  statarray[25]
                     73: #define STAT_VAR_GHASH_MAXSIZE statarray[26]
                     74: #define STAT_VAR_POWER         statarray[27]
1.3     ! espie      75: #define STAT_GROWARRAY         statarray[28]
1.1       espie      76:
                     77: #define STAT_NUMBER            30
                     78:
1.2       espie      79: #else
                     80: #define Init_Stats()
1.1       espie      81: #endif
                     82:
1.2       espie      83: #endif