source: XIOS/trunk/src/tracer.cpp @ 1655

Last change on this file since 1655 was 1655, checked in by ymipsl, 5 years ago

Implement tracing with scorep

YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:eol-style set to native
File size: 898 bytes
RevLine 
[347]1#include "tracer.hpp"
[1655]2
3#if defined(VTRACE)
4
[1639]5#include <vt_user.h>
[1655]6
7#elif defined(SCOREP)
8
9#include <scorep/SCOREP_User.h>
10
[347]11#endif
[1655]12
[347]13#include <string>
14
15namespace xios
16{
17  using namespace std ;
18 
19  void traceOn(void)
20  {
[1655]21#if defined(VTRACE)
[1639]22    VT_ON() ;
[1655]23#elif defined(SCOREP)
24    SCOREP_RECORDING_ON()
[347]25#endif
26  }
27 
28  void traceOff(void) 
29  {
[1655]30#if defined(VTRACE)
[1639]31    VT_OFF() ;
[1655]32#elif defined(SCOREP)
33    SCOREP_RECORDING_OFF()
[347]34#endif
35  }
36 
37  void traceBegin(const string& name)
38  {
[1655]39#if defined(VTRACE)
[1639]40    VT_USER_START(name.c_str()) ;
[1655]41#elif defined(SCOREP)
42    SCOREP_USER_REGION_BY_NAME_BEGIN(name.c_str(),SCOREP_USER_REGION_TYPE_COMMON)
[347]43#endif
44  }
45 
46  void traceEnd(const string& name)
47  {
[1655]48#ifdef defined(VTRACE)
[1639]49    VT_USER_END(name.c_str()) ;
[1655]50#elif defined(SCOREP)
51    SCOREP_USER_REGION_BY_NAME_END(name.c_str())
[347]52#endif
53  }
54 
55//  void marker(const string& name,const string& text) ;
56 
57 
58}
Note: See TracBrowser for help on using the repository browser.