Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/sys
File: gmon.h
/*-
[0] Fix | Delete
* Copyright (c) 1982, 1986, 1992, 1993
[1] Fix | Delete
* The Regents of the University of California. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[10] Fix | Delete
* documentation and/or other materials provided with the distribution.
[11] Fix | Delete
* 4. Neither the name of the University nor the names of its contributors
[12] Fix | Delete
* may be used to endorse or promote products derived from this software
[13] Fix | Delete
* without specific prior written permission.
[14] Fix | Delete
*
[15] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
[16] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[17] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[18] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
[19] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[20] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[21] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[22] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[23] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[24] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[25] Fix | Delete
* SUCH DAMAGE.
[26] Fix | Delete
*
[27] Fix | Delete
* @(#)gmon.h 8.2 (Berkeley) 1/4/94
[28] Fix | Delete
*/
[29] Fix | Delete
[30] Fix | Delete
#ifndef _SYS_GMON_H
[31] Fix | Delete
#define _SYS_GMON_H 1
[32] Fix | Delete
[33] Fix | Delete
#include <features.h>
[34] Fix | Delete
[35] Fix | Delete
#include <sys/types.h>
[36] Fix | Delete
[37] Fix | Delete
/*
[38] Fix | Delete
* See gmon_out.h for gmon.out format.
[39] Fix | Delete
*/
[40] Fix | Delete
[41] Fix | Delete
/* structure emitted by "gcc -a". This must match struct bb in
[42] Fix | Delete
gcc/libgcc2.c. It is OK for gcc to declare a longer structure as
[43] Fix | Delete
long as the members below are present. */
[44] Fix | Delete
struct __bb
[45] Fix | Delete
{
[46] Fix | Delete
long zero_word;
[47] Fix | Delete
const char *filename;
[48] Fix | Delete
long *counts;
[49] Fix | Delete
long ncounts;
[50] Fix | Delete
struct __bb *next;
[51] Fix | Delete
const unsigned long *addresses;
[52] Fix | Delete
};
[53] Fix | Delete
[54] Fix | Delete
extern struct __bb *__bb_head;
[55] Fix | Delete
[56] Fix | Delete
/*
[57] Fix | Delete
* histogram counters are unsigned shorts (according to the kernel).
[58] Fix | Delete
*/
[59] Fix | Delete
#define HISTCOUNTER unsigned short
[60] Fix | Delete
[61] Fix | Delete
/*
[62] Fix | Delete
* fraction of text space to allocate for histogram counters here, 1/2
[63] Fix | Delete
*/
[64] Fix | Delete
#define HISTFRACTION 2
[65] Fix | Delete
[66] Fix | Delete
/*
[67] Fix | Delete
* Fraction of text space to allocate for from hash buckets.
[68] Fix | Delete
* The value of HASHFRACTION is based on the minimum number of bytes
[69] Fix | Delete
* of separation between two subroutine call points in the object code.
[70] Fix | Delete
* Given MIN_SUBR_SEPARATION bytes of separation the value of
[71] Fix | Delete
* HASHFRACTION is calculated as:
[72] Fix | Delete
*
[73] Fix | Delete
* HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);
[74] Fix | Delete
*
[75] Fix | Delete
* For example, on the VAX, the shortest two call sequence is:
[76] Fix | Delete
*
[77] Fix | Delete
* calls $0,(r0)
[78] Fix | Delete
* calls $0,(r0)
[79] Fix | Delete
*
[80] Fix | Delete
* which is separated by only three bytes, thus HASHFRACTION is
[81] Fix | Delete
* calculated as:
[82] Fix | Delete
*
[83] Fix | Delete
* HASHFRACTION = 3 / (2 * 2 - 1) = 1
[84] Fix | Delete
*
[85] Fix | Delete
* Note that the division above rounds down, thus if MIN_SUBR_FRACTION
[86] Fix | Delete
* is less than three, this algorithm will not work!
[87] Fix | Delete
*
[88] Fix | Delete
* In practice, however, call instructions are rarely at a minimal
[89] Fix | Delete
* distance. Hence, we will define HASHFRACTION to be 2 across all
[90] Fix | Delete
* architectures. This saves a reasonable amount of space for
[91] Fix | Delete
* profiling data structures without (in practice) sacrificing
[92] Fix | Delete
* any granularity.
[93] Fix | Delete
*/
[94] Fix | Delete
#define HASHFRACTION 2
[95] Fix | Delete
[96] Fix | Delete
/*
[97] Fix | Delete
* Percent of text space to allocate for tostructs.
[98] Fix | Delete
* This is a heuristic; we will fail with a warning when profiling programs
[99] Fix | Delete
* with a very large number of very small functions, but that's
[100] Fix | Delete
* normally OK.
[101] Fix | Delete
* 2 is probably still a good value for normal programs.
[102] Fix | Delete
* Profiling a test case with 64000 small functions will work if
[103] Fix | Delete
* you raise this value to 3 and link statically (which bloats the
[104] Fix | Delete
* text size, thus raising the number of arcs expected by the heuristic).
[105] Fix | Delete
*/
[106] Fix | Delete
#define ARCDENSITY 3
[107] Fix | Delete
[108] Fix | Delete
/*
[109] Fix | Delete
* Always allocate at least this many tostructs. This
[110] Fix | Delete
* hides the inadequacy of the ARCDENSITY heuristic, at least
[111] Fix | Delete
* for small programs.
[112] Fix | Delete
*
[113] Fix | Delete
* Value can be overridden at runtime by glibc.gmon.minarcs tunable.
[114] Fix | Delete
*/
[115] Fix | Delete
#define MINARCS 50
[116] Fix | Delete
[117] Fix | Delete
/*
[118] Fix | Delete
* The type used to represent indices into gmonparam.tos[].
[119] Fix | Delete
*/
[120] Fix | Delete
#define ARCINDEX unsigned long
[121] Fix | Delete
[122] Fix | Delete
/*
[123] Fix | Delete
* Maximum number of arcs we want to allow.
[124] Fix | Delete
* Used to be max representable value of ARCINDEX minus 2, but now
[125] Fix | Delete
* that ARCINDEX is a long, that's too large; we don't really want
[126] Fix | Delete
* to allow a 48 gigabyte table.
[127] Fix | Delete
*
[128] Fix | Delete
* Value can be overridden at runtime by glibc.gmon.maxarcs tunable.
[129] Fix | Delete
*/
[130] Fix | Delete
#define MAXARCS (1 << 20)
[131] Fix | Delete
[132] Fix | Delete
struct tostruct {
[133] Fix | Delete
unsigned long selfpc;
[134] Fix | Delete
long count;
[135] Fix | Delete
ARCINDEX link;
[136] Fix | Delete
};
[137] Fix | Delete
[138] Fix | Delete
/*
[139] Fix | Delete
* a raw arc, with pointers to the calling site and
[140] Fix | Delete
* the called site and a count.
[141] Fix | Delete
*/
[142] Fix | Delete
struct rawarc {
[143] Fix | Delete
unsigned long raw_frompc;
[144] Fix | Delete
unsigned long raw_selfpc;
[145] Fix | Delete
long raw_count;
[146] Fix | Delete
};
[147] Fix | Delete
[148] Fix | Delete
/*
[149] Fix | Delete
* general rounding functions.
[150] Fix | Delete
*/
[151] Fix | Delete
#define ROUNDDOWN(x,y) (((x)/(y))*(y))
[152] Fix | Delete
#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y))
[153] Fix | Delete
[154] Fix | Delete
/*
[155] Fix | Delete
* The profiling data structures are housed in this structure.
[156] Fix | Delete
*/
[157] Fix | Delete
struct gmonparam {
[158] Fix | Delete
long int state;
[159] Fix | Delete
unsigned short *kcount;
[160] Fix | Delete
unsigned long kcountsize;
[161] Fix | Delete
ARCINDEX *froms;
[162] Fix | Delete
unsigned long fromssize;
[163] Fix | Delete
struct tostruct *tos;
[164] Fix | Delete
unsigned long tossize;
[165] Fix | Delete
long tolimit;
[166] Fix | Delete
unsigned long lowpc;
[167] Fix | Delete
unsigned long highpc;
[168] Fix | Delete
unsigned long textsize;
[169] Fix | Delete
unsigned long hashfraction;
[170] Fix | Delete
long log_hashfraction;
[171] Fix | Delete
};
[172] Fix | Delete
[173] Fix | Delete
/*
[174] Fix | Delete
* Possible states of profiling.
[175] Fix | Delete
*/
[176] Fix | Delete
#define GMON_PROF_ON 0
[177] Fix | Delete
#define GMON_PROF_BUSY 1
[178] Fix | Delete
#define GMON_PROF_ERROR 2
[179] Fix | Delete
#define GMON_PROF_OFF 3
[180] Fix | Delete
[181] Fix | Delete
/*
[182] Fix | Delete
* Sysctl definitions for extracting profiling information from the kernel.
[183] Fix | Delete
*/
[184] Fix | Delete
#define GPROF_STATE 0 /* int: profiling enabling variable */
[185] Fix | Delete
#define GPROF_COUNT 1 /* struct: profile tick count buffer */
[186] Fix | Delete
#define GPROF_FROMS 2 /* struct: from location hash bucket */
[187] Fix | Delete
#define GPROF_TOS 3 /* struct: destination/count structure */
[188] Fix | Delete
#define GPROF_GMONPARAM 4 /* struct: profiling parameters (see above) */
[189] Fix | Delete
[190] Fix | Delete
__BEGIN_DECLS
[191] Fix | Delete
[192] Fix | Delete
/* Set up data structures and start profiling. */
[193] Fix | Delete
extern void __monstartup (unsigned long __lowpc, unsigned long __highpc) __THROW;
[194] Fix | Delete
extern void monstartup (unsigned long __lowpc, unsigned long __highpc) __THROW;
[195] Fix | Delete
[196] Fix | Delete
/* Clean up profiling and write out gmon.out. */
[197] Fix | Delete
extern void _mcleanup (void) __THROW;
[198] Fix | Delete
[199] Fix | Delete
__END_DECLS
[200] Fix | Delete
[201] Fix | Delete
#endif /* sys/gmon.h */
[202] Fix | Delete
[203] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function