tracer.cpp 533 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "tracer.hpp"
  2. #ifdef VTRACE
  3. #include <vt_user.h>
  4. #endif
  5. #include <string>
  6. namespace xios
  7. {
  8. using namespace std ;
  9. void traceOn(void)
  10. {
  11. #ifdef VTRACE
  12. VT_ON() ;
  13. #endif
  14. }
  15. void traceOff(void)
  16. {
  17. #ifdef VTRACE
  18. VT_OFF() ;
  19. #endif
  20. }
  21. void traceBegin(const string& name)
  22. {
  23. #ifdef VTRACE
  24. VT_USER_START(name.c_str()) ;
  25. #endif
  26. }
  27. void traceEnd(const string& name)
  28. {
  29. #ifdef VTRACE
  30. VT_USER_END(name.c_str()) ;
  31. #endif
  32. }
  33. // void marker(const string& name,const string& text) ;
  34. }