1 /* Copyright (C) 2001-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
24 #include <sys/types.h>
26 /* This interface is intended to follow the sprofil() system calls as
27 described by the sprofil(2) man page of Irix v6.5, except that:
29 - there is no a priori limit on number of text sections
30 - pr_scale is declared as unsigned long (instead of "unsigned int")
31 - pr_size is declared as size_t (instead of "unsigned int")
32 - pr_off is declared as void * (instead of "__psunsigned_t")
33 - the overflow bin (pr_base==0, pr_scale==2) can appear anywhere
35 - PROF_FAST has no effect */
39 void *pr_base
; /* buffer base */
40 size_t pr_size
; /* buffer size */
41 size_t pr_off
; /* pc offset */
42 unsigned long int pr_scale
; /* pc scaling (fixed-point number) */
47 PROF_USHORT
= 0, /* use 16-bit counters (default) */
48 PROF_UINT
= 1 << 0, /* use 32-bit counters */
49 PROF_FAST
= 1 << 1 /* profile faster than usual */
55 extern int sprofil (struct prof
*__profp
, int __profcnt
,
56 struct timeval
*__tvp
, unsigned int __flags
) __THROW
;