hjl / source-git / glibc

Forked from source-git/glibc 4 years ago
Clone

Blame gmon/sys/profil.h

Packit 6c4009
/* Copyright (C) 2001-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _PROFIL_H
Packit 6c4009
#define _PROFIL_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
Packit 6c4009
#include <sys/time.h>
Packit 6c4009
#include <sys/types.h>
Packit 6c4009
Packit 6c4009
/* This interface is intended to follow the sprofil() system calls as
Packit 6c4009
   described by the sprofil(2) man page of Irix v6.5, except that:
Packit 6c4009
Packit 6c4009
	- there is no a priori limit on number of text sections
Packit 6c4009
	- pr_scale is declared as unsigned long (instead of "unsigned int")
Packit 6c4009
	- pr_size is declared as size_t (instead of "unsigned int")
Packit 6c4009
	- pr_off is declared as void * (instead of "__psunsigned_t")
Packit 6c4009
	- the overflow bin (pr_base==0, pr_scale==2) can appear anywhere
Packit 6c4009
	  in the profp array
Packit 6c4009
	- PROF_FAST has no effect  */
Packit 6c4009
Packit 6c4009
struct prof
Packit 6c4009
  {
Packit 6c4009
    void *pr_base;		/* buffer base */
Packit 6c4009
    size_t pr_size;		/* buffer size */
Packit 6c4009
    size_t pr_off;		/* pc offset */
Packit 6c4009
    unsigned long int pr_scale;	/* pc scaling (fixed-point number) */
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
enum
Packit 6c4009
  {
Packit 6c4009
    PROF_USHORT	= 0,		/* use 16-bit counters (default) */
Packit 6c4009
    PROF_UINT	= 1 << 0,	/* use 32-bit counters */
Packit 6c4009
    PROF_FAST   = 1 << 1	/* profile faster than usual */
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
extern int sprofil (struct prof *__profp, int __profcnt,
Packit 6c4009
		    struct timeval *__tvp, unsigned int __flags) __THROW;
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* profil.h */