|
8.4 (revision 624046d2)
|
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__
528 #define SCOREP_USER_FUNC_DEFINE()
530 #ifdef SCOREP_USER_ENABLE
532 #define SCOREP_USER_REGION_DEFINE( handle ) \
533 static SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
535 #define SCOREP_USER_REGION_ENTER( handle ) SCOREP_User_RegionEnter( handle );
537 #define SCOREP_USER_REGION_BEGIN( handle, name, type ) SCOREP_User_RegionBegin( \
538 &handle, &SCOREP_User_LastFileName, &SCOREP_User_LastFileHandle, name, \
539 type, __FILE__, __LINE__ );
541 #define SCOREP_USER_REGION_INIT( handle, name, type ) SCOREP_User_RegionInit( \
542 &handle, &SCOREP_User_LastFileName, &SCOREP_User_LastFileHandle, name, \
543 type, __FILE__, __LINE__ );
545 #define SCOREP_USER_REGION_END( handle ) SCOREP_User_RegionEnd( handle );
548 #define SCOREP_USER_REGION_BY_NAME_BEGIN( name, type ) SCOREP_User_RegionByNameBegin( \
552 #define SCOREP_USER_REGION_BY_NAME_END( name ) SCOREP_User_RegionByNameEnd( name );
554 #define SCOREP_USER_REWIND_DEFINE( handle ) \
555 static SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
557 #define SCOREP_USER_REWIND_POINT( handle, name ) \
558 SCOREP_User_RewindRegionBegin( &handle, &SCOREP_User_LastFileName, \
559 &SCOREP_User_LastFileHandle, name, \
560 SCOREP_USER_REGION_TYPE_COMMON, __FILE__, __LINE__ );
562 #define SCOREP_USER_REWIND_CHECK( handle, value ) \
563 SCOREP_User_RewindRegionEnd( handle, value );
565 #define SCOREP_USER_FUNC_BEGIN() static SCOREP_User_RegionHandle \
566 scorep_user_func_handle = SCOREP_USER_INVALID_REGION; \
567 SCOREP_User_RegionBegin( &scorep_user_func_handle, &SCOREP_User_LastFileName, \
568 &SCOREP_User_LastFileHandle, SCOREP_USER_FUNCTION_NAME, \
569 SCOREP_USER_REGION_TYPE_FUNCTION, __FILE__, __LINE__ );
571 #define SCOREP_USER_FUNC_END() SCOREP_User_RegionEnd( scorep_user_func_handle );
573 #define SCOREP_USER_GLOBAL_REGION_DEFINE( handle ) \
574 SCOREP_User_RegionHandle handle = SCOREP_USER_INVALID_REGION;
576 #define SCOREP_USER_GLOBAL_REGION_EXTERNAL( handle ) \
577 extern SCOREP_User_RegionHandle handle;
579 #endif // SCOREP_USER_ENABLE
681 #ifdef SCOREP_USER_ENABLE
683 #define SCOREP_USER_PARAMETER_INT64( name, value ) { \
684 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
685 SCOREP_User_ParameterInt64( &scorep_param, name, value ); }
687 #define SCOREP_USER_PARAMETER_UINT64( name, value ) { \
688 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
689 SCOREP_User_ParameterUint64( &scorep_param, name, value ); }
691 #define SCOREP_USER_PARAMETER_STRING( name, value ) { \
692 static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
693 SCOREP_User_ParameterString( &scorep_param, name, value ); }
695 #endif // SCOREP_USER_ENABLE
1035 #ifdef SCOREP_USER_ENABLE
1037 #define SCOREP_USER_METRIC_LOCAL( metricHandle ) static SCOREP_SamplingSetHandle \
1039 = SCOREP_INVALID_SAMPLING_SET;
1041 #define SCOREP_USER_METRIC_GLOBAL( metricHandle ) SCOREP_SamplingSetHandle metricHandle \
1042 = SCOREP_INVALID_SAMPLING_SET;
1044 #define SCOREP_USER_METRIC_EXTERNAL( metricHandle ) \
1045 extern SCOREP_SamplingSetHandle metricHandle;
1047 #define SCOREP_USER_METRIC_INIT( metricHandle, name, unit, type, context ) \
1048 SCOREP_User_InitMetric( &metricHandle, name, unit, type, context );
1050 #define SCOREP_USER_METRIC_INT64( metricHandle, \
1051 value ) SCOREP_User_TriggerMetricInt64( \
1052 metricHandle, value );
1054 #define SCOREP_USER_METRIC_UINT64( metricHandle, \
1055 value ) SCOREP_User_TriggerMetricUint64( \
1056 metricHandle, value );
1058 #define SCOREP_USER_METRIC_DOUBLE( metricHandle, \
1059 value ) SCOREP_User_TriggerMetricDouble( \
1060 metricHandle, value );
1062 #endif // SCOREP_USER_ENABLE
1168 #ifdef SCOREP_USER_ENABLE
1170 #define SCOREP_USER_CARTESIAN_TOPOLOGY_CREATE( userTopology, name, nDims ) \
1171 SCOREP_User_CartesianTopologyHandle userTopology = SCOREP_USER_INVALID_CARTESIAN_TOPOLOGY; \
1172 SCOREP_User_CartTopologyCreate( &userTopology, name, nDims );
1174 #define SCOREP_USER_CARTESIAN_TOPOLOGY_ADD_DIM( userTopology, size, periodic, name ) \
1175 SCOREP_User_CartTopologyAddDim( userTopology, size, periodic, name );
1177 #define SCOREP_USER_CARTESIAN_TOPOLOGY_INIT( userTopology ) \
1178 SCOREP_User_CartTopologyInit( userTopology );
1180 #define SCOREP_USER_CARTESIAN_TOPOLOGY_SET_COORDS( userTopology, nDims, ... ) \
1181 SCOREP_User_CartTopologySetCoords( userTopology, nDims, __VA_ARGS__ );
1183 #endif // SCOREP_USER_ENABLE
1186 #define SCOREP_USER_CARTESIAN_TOPOLOGY_DEFINE( userTopology )
1226 #ifdef SCOREP_USER_ENABLE
1235 #define SCOREP_USER_REGION( name, type ) static SCOREP_User_RegionHandle \
1236 scorep_user_region_handle = SCOREP_USER_INVALID_REGION; \
1237 SCOREP_User_RegionClass \
1238 scorep_user_region_inst( &scorep_user_region_handle, \
1241 &SCOREP_User_LastFileName, \
1242 &SCOREP_User_LastFileHandle, \
1243 __FILE__, __LINE__ );
1245 #else // __cplusplus
1247 #define SCOREP_USER_REGION( name, type )
1249 #endif // __cplusplus
1251 #endif // SCOREP_USER_ENABLE
1364 #ifdef SCOREP_USER_ENABLE
1366 #define SCOREP_RECORDING_ON() SCOREP_User_EnableRecording();
1368 #define SCOREP_RECORDING_OFF() SCOREP_User_DisableRecording();
1370 #define SCOREP_RECORDING_IS_ON() SCOREP_User_RecordingEnabled()
1372 #else // SCOREP_USER_ENABLE
1378 #define SCOREP_USER_REGION( name, type )
1379 #define SCOREP_USER_REGION_DEFINE( handle )
1380 #define SCOREP_USER_REWIND_DEFINE( handle )
1381 #define SCOREP_USER_REWIND_POINT( handle, name )
1382 #define SCOREP_USER_REGION_BEGIN( handle, name, type )
1383 #define SCOREP_USER_REGION_BY_NAME_BEGIN( name, type )
1384 #define SCOREP_USER_REGION_INIT( handle, name, type )
1385 #define SCOREP_USER_REGION_END( handle )
1386 #define SCOREP_USER_REGION_BY_NAME_END( name )
1387 #define SCOREP_USER_REWIND_CHECK( handle, value )
1388 #define SCOREP_USER_REGION_ENTER( handle )
1389 #define SCOREP_USER_FUNC_BEGIN()
1390 #define SCOREP_USER_FUNC_END()
1391 #define SCOREP_USER_GLOBAL_REGION_DEFINE( handle )
1392 #define SCOREP_USER_GLOBAL_REGION_EXTERNAL( handle )
1393 #define SCOREP_USER_PARAMETER_INT64( name, value )
1394 #define SCOREP_USER_PARAMETER_UINT64( name, value )
1395 #define SCOREP_USER_PARAMETER_STRING( name, value )
1396 #define SCOREP_USER_METRIC_GLOBAL( metricHandle )
1397 #define SCOREP_USER_METRIC_EXTERNAL( metricHandle )
1398 #define SCOREP_USER_METRIC_LOCAL( metricHandle )
1399 #define SCOREP_USER_METRIC_INIT( metricHandle, name, unit, type, context )
1400 #define SCOREP_USER_METRIC_INT64( metricHandle, value )
1401 #define SCOREP_USER_METRIC_UINT64( metricHandle, value )
1402 #define SCOREP_USER_METRIC_DOUBLE( metricHandle, value )
1403 #define SCOREP_RECORDING_ON()
1404 #define SCOREP_RECORDING_OFF()
1405 #define SCOREP_RECORDING_IS_ON() 0
1406 #define SCOREP_USER_CARTESIAN_TOPOLOGY_CREATE( userTopology, name, ndims )
1407 #define SCOREP_USER_CARTESIAN_TOPOLOGY_ADD_DIM( userTopology, size, periodic, name )
1408 #define SCOREP_USER_CARTESIAN_TOPOLOGY_INIT( userTopology )
1409 #define SCOREP_USER_CARTESIAN_TOPOLOGY_SET_COORDS( userTopology, nDims, ... )
1411 #endif // SCOREP_USER_ENABLE