|
6.0 (revision 14673)
|
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
1289 #ifdef SCOREP_USER_ENABLE
1291 #define SCOREP_USER_CARTESIAN_TOPOLOGY_CREATE( userTopology, name, nDims ) \
1292 SCOREP_User_CartesianTopologyHandle userTopology = SCOREP_USER_INVALID_CARTESIAN_TOPOLOGY; \
1293 SCOREP_User_CartTopologyCreate( &userTopology, name, nDims );
1295 #define SCOREP_USER_CARTESIAN_TOPOLOGY_ADD_DIM( userTopology, size, periodic, name ) \
1296 SCOREP_User_CartTopologyAddDim( userTopology, size, periodic, name );
1298 #define SCOREP_USER_CARTESIAN_TOPOLOGY_INIT( userTopology ) \
1299 SCOREP_User_CartTopologyInit( userTopology );
1301 #define SCOREP_USER_CARTESIAN_TOPOLOGY_SET_COORDS( userTopology, nDims, ... ) \
1302 SCOREP_User_CartTopologySetCoords( userTopology, nDims, __VA_ARGS__ );
1304 #endif // SCOREP_USER_ENABLE
1307 #define SCOREP_USER_CARTESIAN_TOPOLOGY_DEFINE( userTopology )
1347 #ifdef SCOREP_USER_ENABLE
1356 #define SCOREP_USER_REGION( name, type ) static SCOREP_User_RegionHandle \
1357 scorep_user_region_handle = SCOREP_USER_INVALID_REGION; \
1358 SCOREP_User_RegionClass \
1359 scorep_user_region_inst( &scorep_user_region_handle, \
1362 &SCOREP_User_LastFileName, \
1363 &SCOREP_User_LastFileHandle, \
1364 __FILE__, __LINE__ );
1366 #else // __cplusplus
1368 #define SCOREP_USER_REGION( name, type )
1370 #endif // __cplusplus
1372 #endif // SCOREP_USER_ENABLE
1485 #ifdef SCOREP_USER_ENABLE
1487 #define SCOREP_RECORDING_ON() SCOREP_User_EnableRecording();
1489 #define SCOREP_RECORDING_OFF() SCOREP_User_DisableRecording();
1491 #define SCOREP_RECORDING_IS_ON() SCOREP_User_RecordingEnabled()
1493 #else // SCOREP_USER_ENABLE
1499 #define SCOREP_USER_REGION( name, type )
1500 #define SCOREP_USER_REGION_DEFINE( handle )
1501 #define SCOREP_USER_REWIND_DEFINE( handle )
1502 #define SCOREP_USER_OA_PHASE_BEGIN( handle, name, type )
1503 #define SCOREP_USER_OA_PHASE_END( handle )
1504 #define SCOREP_USER_REWIND_POINT( handle, name )
1505 #define SCOREP_USER_REGION_BEGIN( handle, name, type )
1506 #define SCOREP_USER_REGION_BY_NAME_BEGIN( name, type )
1507 #define SCOREP_USER_REGION_INIT( handle, name, type )
1508 #define SCOREP_USER_REGION_END( handle )
1509 #define SCOREP_USER_REGION_BY_NAME_END( name )
1510 #define SCOREP_USER_REWIND_CHECK( handle, value )
1511 #define SCOREP_USER_REGION_ENTER( handle )
1512 #define SCOREP_USER_FUNC_BEGIN()
1513 #define SCOREP_USER_FUNC_END()
1514 #define SCOREP_USER_GLOBAL_REGION_DEFINE( handle )
1515 #define SCOREP_USER_GLOBAL_REGION_EXTERNAL( handle )
1516 #define SCOREP_USER_PARAMETER_INT64( name, value )
1517 #define SCOREP_USER_PARAMETER_UINT64( name, value )
1518 #define SCOREP_USER_PARAMETER_STRING( name, value )
1519 #define SCOREP_USER_METRIC_GLOBAL( metricHandle )
1520 #define SCOREP_USER_METRIC_EXTERNAL( metricHandle )
1521 #define SCOREP_USER_METRIC_LOCAL( metricHandle )
1522 #define SCOREP_USER_METRIC_INIT( metricHandle, name, unit, type, context )
1523 #define SCOREP_USER_METRIC_INT64( metricHandle, value )
1524 #define SCOREP_USER_METRIC_UINT64( metricHandle, value )
1525 #define SCOREP_USER_METRIC_DOUBLE( metricHandle, value )
1526 #define SCOREP_RECORDING_ON()
1527 #define SCOREP_RECORDING_OFF()
1528 #define SCOREP_RECORDING_IS_ON() 0
1529 #define SCOREP_USER_CARTESIAN_TOPOLOGY_CREATE( userTopology, name, ndims )
1530 #define SCOREP_USER_CARTESIAN_TOPOLOGY_ADD_DIM( userTopology, size, periodic, name )
1531 #define SCOREP_USER_CARTESIAN_TOPOLOGY_INIT( userTopology )
1532 #define SCOREP_USER_CARTESIAN_TOPOLOGY_SET_COORDS( userTopology, nDims, ... )
1534 #endif // SCOREP_USER_ENABLE