|
4.1 (revision 13848)
|
Go to the documentation of this file.
42 #ifdef SCOREP_USER_ENABLE
43 #include <scorep/SCOREP_User_Variables.h>
44 #include <scorep/SCOREP_User_Functions.h>
49 #ifndef SCOREP_USER_FUNCTION_NAME
50 #if defined( __cplusplus ) && defined( __FUJITSU )
51 #define SCOREP_USER_FUNCTION_NAME __FUNCTION__
53 #define SCOREP_USER_FUNCTION_NAME __func__
642 #define SCOREP_USER_FUNC_DEFINE()
644 #ifdef SCOREP_USER_ENABLE
646 #define SCOREP_USER_OA_PHASE_BEGIN( handle, name, type ) SCOREP_User_OaPhaseBegin( \
647 &handle, &SCOREP_User_LastFileName, &SCOREP_User_LastFileHandle, name, \
648 type, __FILE__, __LINE__ );
650 #define SCOREP_USER_OA_PHASE_END( handle ) \
651 SCOREP_User_OaPhaseEnd( handle );
653 #define SCOREP_USER_REGION_DEFINE( handle ) \
654 static SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
656 #define SCOREP_USER_REGION_ENTER( handle ) SCOREP_User_RegionEnter( handle );
658 #define SCOREP_USER_REGION_BEGIN( handle, name, type ) SCOREP_User_RegionBegin( \
659 &handle, &SCOREP_User_LastFileName, &SCOREP_User_LastFileHandle, name, \
660 type, __FILE__, __LINE__ );
662 #define SCOREP_USER_REGION_INIT( handle, name, type ) SCOREP_User_RegionInit( \
663 &handle, &SCOREP_User_LastFileName, &SCOREP_User_LastFileHandle, name, \
664 type, __FILE__, __LINE__ );
666 #define SCOREP_USER_REGION_END( handle ) SCOREP_User_RegionEnd( handle );
669 #define SCOREP_USER_REGION_BY_NAME_BEGIN( name, type ) SCOREP_User_RegionByNameBegin( \
673 #define SCOREP_USER_REGION_BY_NAME_END( name ) SCOREP_User_RegionByNameEnd( name );
675 #define SCOREP_USER_REWIND_DEFINE( handle ) \
676 static SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
678 #define SCOREP_USER_REWIND_POINT( handle, name ) \
679 SCOREP_User_RewindRegionBegin( &handle, &SCOREP_User_LastFileName, \
680 &SCOREP_User_LastFileHandle, name, \
681 SCOREP_USER_REGION_TYPE_COMMON, __FILE__, __LINE__ );
683 #define SCOREP_USER_REWIND_CHECK( handle, value ) \
684 SCOREP_User_RewindRegionEnd( handle, value );
686 #define SCOREP_USER_FUNC_BEGIN() static SCOREP_User_RegionHandle \
687 scorep_user_func_handle = SCOREP_USER_INVALID_REGION; \
688 SCOREP_User_RegionBegin( &scorep_user_func_handle, &SCOREP_User_LastFileName, \
689 &SCOREP_User_LastFileHandle, SCOREP_USER_FUNCTION_NAME, \
690 SCOREP_USER_REGION_TYPE_FUNCTION, __FILE__, __LINE__ );
692 #define SCOREP_USER_FUNC_END() SCOREP_User_RegionEnd( scorep_user_func_handle );
694 #define SCOREP_USER_GLOBAL_REGION_DEFINE( handle ) \
695 SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
697 #define SCOREP_USER_GLOBAL_REGION_EXTERNAL( handle ) \
698 extern SCOREP_User_RegionHandle handle;
700 #endif // SCOREP_USER_ENABLE
802 #ifdef SCOREP_USER_ENABLE
804 #define SCOREP_USER_PARAMETER_INT64( name, value ) { \
805 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
806 SCOREP_User_ParameterInt64( &scorep_param, name, value ); }
808 #define SCOREP_USER_PARAMETER_UINT64( name, value ) { \
809 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
810 SCOREP_User_ParameterUint64( &scorep_param, name, value ); }
812 #define SCOREP_USER_PARAMETER_STRING( name, value ) { \
813 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
814 SCOREP_User_ParameterString( &scorep_param, name, value ); }
816 #endif // SCOREP_USER_ENABLE
1156 #ifdef SCOREP_USER_ENABLE
1158 #define SCOREP_USER_METRIC_LOCAL( metricHandle ) static SCOREP_SamplingSetHandle \
1160 = SCOREP_INVALID_SAMPLING_SET;
1162 #define SCOREP_USER_METRIC_GLOBAL( metricHandle ) SCOREP_SamplingSetHandle metricHandle \
1163 = SCOREP_INVALID_SAMPLING_SET;
1165 #define SCOREP_USER_METRIC_EXTERNAL( metricHandle ) \
1166 extern SCOREP_SamplingSetHandle metricHandle;
1168 #define SCOREP_USER_METRIC_INIT( metricHandle, name, unit, type, context ) \
1169 SCOREP_User_InitMetric( &metricHandle, name, unit, type, context );
1171 #define SCOREP_USER_METRIC_INT64( metricHandle, \
1172 value ) SCOREP_User_TriggerMetricInt64( \
1173 metricHandle, value );
1175 #define SCOREP_USER_METRIC_UINT64( metricHandle, \
1176 value ) SCOREP_User_TriggerMetricUint64( \
1177 metricHandle, value );
1179 #define SCOREP_USER_METRIC_DOUBLE( metricHandle, \
1180 value ) SCOREP_User_TriggerMetricDouble( \
1181 metricHandle, value );
1183 #endif // SCOREP_USER_ENABLE
1223 #ifdef SCOREP_USER_ENABLE
1232 #define SCOREP_USER_REGION( name, type ) static SCOREP_User_RegionHandle \
1233 scorep_user_region_handle = SCOREP_USER_INVALID_REGION; \
1234 SCOREP_User_RegionClass \
1235 scorep_user_region_inst( &scorep_user_region_handle, \
1238 &SCOREP_User_LastFileName, \
1239 &SCOREP_User_LastFileHandle, \
1240 __FILE__, __LINE__ );
1242 #else // __cplusplus
1244 #define SCOREP_USER_REGION( name, type )
1246 #endif // __cplusplus
1248 #endif // SCOREP_USER_ENABLE
1361 #ifdef SCOREP_USER_ENABLE
1363 #define SCOREP_RECORDING_ON() SCOREP_User_EnableRecording();
1365 #define SCOREP_RECORDING_OFF() SCOREP_User_DisableRecording();
1367 #define SCOREP_RECORDING_IS_ON() SCOREP_User_RecordingEnabled()
1369 #else // SCOREP_USER_ENABLE
1375 #define SCOREP_USER_REGION( name, type )
1376 #define SCOREP_USER_REGION_DEFINE( handle )
1377 #define SCOREP_USER_REWIND_DEFINE( handle )
1378 #define SCOREP_USER_OA_PHASE_BEGIN( handle, name, type )
1379 #define SCOREP_USER_OA_PHASE_END( handle )
1380 #define SCOREP_USER_REWIND_POINT( handle, name )
1381 #define SCOREP_USER_REGION_BEGIN( handle, name, type )
1382 #define SCOREP_USER_REGION_BY_NAME_BEGIN( name, type )
1383 #define SCOREP_USER_REGION_INIT( handle, name, type )
1384 #define SCOREP_USER_REGION_END( handle )
1385 #define SCOREP_USER_REGION_BY_NAME_END( name )
1386 #define SCOREP_USER_REWIND_CHECK( handle, value )
1387 #define SCOREP_USER_REGION_ENTER( handle )
1388 #define SCOREP_USER_FUNC_BEGIN()
1389 #define SCOREP_USER_FUNC_END()
1390 #define SCOREP_USER_GLOBAL_REGION_DEFINE( handle )
1391 #define SCOREP_USER_GLOBAL_REGION_EXTERNAL( handle )
1392 #define SCOREP_USER_PARAMETER_INT64( name, value )
1393 #define SCOREP_USER_PARAMETER_UINT64( name, value )
1394 #define SCOREP_USER_PARAMETER_STRING( name, value )
1395 #define SCOREP_USER_METRIC_GLOBAL( metricHandle )
1396 #define SCOREP_USER_METRIC_EXTERNAL( metricHandle )
1397 #define SCOREP_USER_METRIC_LOCAL( metricHandle )
1398 #define SCOREP_USER_METRIC_INIT( metricHandle, name, unit, type, context )
1399 #define SCOREP_USER_METRIC_INT64( metricHandle, value )
1400 #define SCOREP_USER_METRIC_UINT64( metricHandle, value )
1401 #define SCOREP_USER_METRIC_DOUBLE( metricHandle, value )
1402 #define SCOREP_RECORDING_ON()
1403 #define SCOREP_RECORDING_OFF()
1404 #define SCOREP_RECORDING_IS_ON() 0
1406 #endif // SCOREP_USER_ENABLE