profil.h 2.0 KB

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