cputildefs.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* cputildefs.h - execution profiling under valgrind
  2. Copyright (C) 2013,2016 Matthew R. Wette
  3. mwette@alumni.caltech.edu
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  15. 02111-1307, USA.
  16. The GNU General Public License is contained in the file COPYING.
  17. */
  18. #ifndef __CPUTILDEFS_H
  19. #define __CPUTILDEFS_H
  20. #include "valgrind.h"
  21. typedef
  22. enum {
  23. VG_USERREQ__CU_NOOP = VG_USERREQ_TOOL_BASE('C','U'),
  24. VG_USERREQ__CU_REGTHR,
  25. VG_USERREQ__CU_CLRCTR,
  26. VG_USERREQ__CU_GETCTR,
  27. VG_USERREQ__CU_GETDIV,
  28. VG_USERREQ__END_OF_CPUTIL = VG_USERREQ_TOOL_BASE('C','U') + 256
  29. } Vg_CputilClientRequest;
  30. /*
  31. * void CU_REGTHR(void);
  32. * void CU_CLRCTR(void);
  33. * unsigned long CU_GETCTR();
  34. * unsigned long CU_GETDIV();
  35. */
  36. #define CU_REGTHR() \
  37. VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CU_REGTHR, 0,0,0,0,0)
  38. #define CU_CLRCTR() \
  39. VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CU_CLRCTR, 0,0,0,0,0)
  40. #define CU_GETCTR() \
  41. VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CU_GETCTR, 0,0,0,0,0)
  42. #define CU_GETDIV() \
  43. VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CU_GETDIV, 0,0,0,0,0)
  44. #endif
  45. /* --- last line --- */