xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/sys/profil.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 /* Copyright (C) 2001 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3 
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8 
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13 
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, write to the Free
16    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17    02111-1307 USA.  */
18 
19 #ifndef _PROFIL_H
20 #define _PROFIL_H	1
21 
22 #include <features.h>
23 
24 #include <sys/time.h>
25 #include <sys/types.h>
26 
27 /* This interface is intended to follow the sprofil() system calls as
28    described by the sprofil(2) man page of Irix v6.5, except that:
29 
30 	- there is no a priori limit on number of text sections
31 	- pr_scale is declared as unsigned long (instead of "unsigned int")
32 	- pr_size is declared as size_t (instead of "unsigned int")
33 	- pr_off is declared as void * (instead of "__psunsigned_t")
34 	- the overflow bin (pr_base==0, pr_scale==2) can appear anywhere
35 	  in the profp array
36 	- PROF_FAST has no effect  */
37 
38 struct prof
39   {
40     void *pr_base;		/* buffer base */
41     size_t pr_size;		/* buffer size */
42     size_t pr_off;		/* pc offset */
43     unsigned long int pr_scale;	/* pc scaling (fixed-point number) */
44   };
45 
46 enum
47   {
48     PROF_USHORT	= 0,		/* use 16-bit counters (default) */
49     PROF_UINT	= 1 << 0,	/* use 32-bit counters */
50     PROF_FAST   = 1 << 1	/* profile faster than usual */
51   };
52 
53 
54 __BEGIN_DECLS
55 
56 extern int sprofil (struct prof *__profp, int __profcnt,
57 		    struct timeval *__tvp, unsigned int __flags) __THROW;
58 
59 __END_DECLS
60 
61 #endif /* profil.h */
62