Changeset 1655


Ignore:
Timestamp:
03/13/19 17:15:18 (5 years ago)
Author:
ymipsl
Message:

Implement tracing with scorep

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/tracer.cpp

    r1639 r1655  
    11#include "tracer.hpp" 
    2 #ifdef VTRACE 
     2 
     3#if defined(VTRACE) 
     4 
    35#include <vt_user.h> 
     6 
     7#elif defined(SCOREP) 
     8 
     9#include <scorep/SCOREP_User.h> 
     10 
    411#endif 
     12 
    513#include <string> 
    614 
     
    1119  void traceOn(void) 
    1220  { 
    13 #ifdef VTRACE 
     21#if defined(VTRACE) 
    1422    VT_ON() ; 
     23#elif defined(SCOREP) 
     24    SCOREP_RECORDING_ON() 
    1525#endif 
    1626  } 
     
    1828  void traceOff(void)  
    1929  { 
    20 #ifdef VTRACE 
     30#if defined(VTRACE) 
    2131    VT_OFF() ; 
     32#elif defined(SCOREP) 
     33    SCOREP_RECORDING_OFF() 
    2234#endif 
    2335  } 
     
    2537  void traceBegin(const string& name) 
    2638  { 
    27 #ifdef VTRACE 
     39#if defined(VTRACE) 
    2840    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) 
    2943#endif 
    3044  } 
     
    3246  void traceEnd(const string& name) 
    3347  { 
    34 #ifdef VTRACE 
     48#ifdef defined(VTRACE) 
    3549    VT_USER_END(name.c_str()) ; 
     50#elif defined(SCOREP) 
     51    SCOREP_USER_REGION_BY_NAME_END(name.c_str()) 
    3652#endif 
    3753  } 
Note: See TracChangeset for help on using the changeset viewer.