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
Line 
1#include "tracer.hpp"
2
3#if defined(VTRACE)
4
5#include <vt_user.h>
6
7#elif defined(SCOREP)
8
9#include <scorep/SCOREP_User.h>
10
11#endif
12
13#include <string>
14
15namespace xios
16{
17  using namespace std ;
18 
19  void traceOn(void)
20  {
21#if defined(VTRACE)
22    VT_ON() ;
23#elif defined(SCOREP)
24    SCOREP_RECORDING_ON()
25#endif
26  }
27 
28  void traceOff(void) 
29  {
30#if defined(VTRACE)
31    VT_OFF() ;
32#elif defined(SCOREP)
33    SCOREP_RECORDING_OFF()
34#endif
35  }
36 
37  void traceBegin(const string& name)
38  {
39#if defined(VTRACE)
40    VT_USER_START(name.c_str()) ;
41#elif defined(SCOREP)
42    SCOREP_USER_REGION_BY_NAME_BEGIN(name.c_str(),SCOREP_USER_REGION_TYPE_COMMON)
43#endif
44  }
45 
46  void traceEnd(const string& name)
47  {
48#ifdef defined(VTRACE)
49    VT_USER_END(name.c_str()) ;
50#elif defined(SCOREP)
51    SCOREP_USER_REGION_BY_NAME_END(name.c_str())
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.