10.0 (revision 35c4bf227)
SCOREP_MetricPlugins.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: (c) 2009 RWTH Aachen University <rwth-aachen.de>
3  * SPDX-FileCopyrightText: (c) 2009 Gesellschaft für numerische Simulation mbH Braunschweig <gns-mbh.com>
4  * SPDX-FileCopyrightText: (c) 2009 Technische Universität Dresden <tu-dresden.de>
5  * SPDX-FileCopyrightText: (c) 2009 University of Oregon <uoregon.edu>
6  * SPDX-FileCopyrightText: (c) 2009 Forschungszentrum Jülich GmbH <fz-juelich.de>
7  * SPDX-FileCopyrightText: (c) 2009 German Research School for Simulation Sciences GmbH
8  * SPDX-FileCopyrightText: (c) 2009 Technische Universität München <tum.de>
9  *
10  * SPDX-License-Identifier: BSD-3-Clause
11  *
12  */
13 
22 #ifndef SCOREP_METRIC_PLUGINS_H
23 #define SCOREP_METRIC_PLUGINS_H
24 
128 #include <stdbool.h>
129 
131 
132 
134 #define SCOREP_METRIC_PLUGIN_VERSION 1
135 
136 #ifdef __cplusplus
137 # define EXTERN extern "C"
138 #else
139 # define EXTERN extern
140 #endif
141 
143 #define SCOREP_METRIC_PLUGIN_ENTRY( _name ) \
144  EXTERN SCOREP_Metric_Plugin_Info \
145  SCOREP_MetricPlugin_ ## _name ## _get_info( void )
146 
147 
148 /* *********************************************************************
149  * Type definitions
150  **********************************************************************/
151 
157 {
159  char* name;
161  char* description;
171  int64_t exponent;
173  char* unit;
175 
181 {
182  /*
183  * For all plugins
184  */
185 
190  uint32_t plugin_version;
191 
197 
205 
221  uint64_t delta_t;
222 
233  int32_t ( * initialize )( void );
234 
239  void ( * finalize )( void );
240 
262  SCOREP_Metric_Plugin_MetricProperties* ( *get_event_info )( char* token );
263 
278  int32_t ( * add_counter )( char* metric_name );
279 
293  uint64_t ( * get_current_value )( int32_t id );
294 
310  bool ( * get_optional_value )( int32_t id,
311  uint64_t* value );
312 
322  void ( * set_clock_function )( uint64_t ( * clock_time )( void ) );
323 
346  uint64_t ( * get_all_values )( int32_t id,
347  SCOREP_MetricTimeValuePair** time_value_list );
348 
349  /* Since of Score-P metric plugin interface version 1 */
350 
375  void ( * synchronize )( bool is_responsible,
377 
378 
380  uint64_t reserved[ 92 ];
382 
383 
384 #endif /* SCOREP_METRIC_PLUGINS_H */
SCOREP_MetricSynchronizationMode
Definition: SCOREP_MetricTypes.h:280
SCOREP_MetricBase
Definition: SCOREP_MetricTypes.h:148
Definition: SCOREP_MetricPlugins.h:180
void(* set_clock_function)(uint64_t(*clock_time)(void))
Definition: SCOREP_MetricPlugins.h:322
bool(* get_optional_value)(int32_t id, uint64_t *value)
Definition: SCOREP_MetricPlugins.h:310
SCOREP_MetricBase base
Definition: SCOREP_MetricPlugins.h:169
SCOREP_MetricPer
Definition: SCOREP_MetricTypes.h:188
uint64_t delta_t
Definition: SCOREP_MetricPlugins.h:221
SCOREP_MetricValueType
Definition: SCOREP_MetricTypes.h:80
uint64_t(* get_current_value)(int32_t id)
Definition: SCOREP_MetricPlugins.h:293
Definition: SCOREP_MetricTypes.h:268
SCOREP_MetricMode
Definition: SCOREP_MetricTypes.h:116
void(* finalize)(void)
Definition: SCOREP_MetricPlugins.h:239
SCOREP_MetricMode mode
Definition: SCOREP_MetricPlugins.h:165
char * name
Definition: SCOREP_MetricPlugins.h:159
uint64_t(* get_all_values)(int32_t id, SCOREP_MetricTimeValuePair **time_value_list)
Definition: SCOREP_MetricPlugins.h:346
Types used by metric service.
SCOREP_MetricValueType value_type
Definition: SCOREP_MetricPlugins.h:167
void(* synchronize)(bool is_responsible, SCOREP_MetricSynchronizationMode sync_mode)
Definition: SCOREP_MetricPlugins.h:375
int64_t exponent
Definition: SCOREP_MetricPlugins.h:171
char * unit
Definition: SCOREP_MetricPlugins.h:173
int32_t(* add_counter)(char *metric_name)
Definition: SCOREP_MetricPlugins.h:278
SCOREP_MetricSynchronicity sync
Definition: SCOREP_MetricPlugins.h:204
char * description
Definition: SCOREP_MetricPlugins.h:161
Properties describing a metric. Provided by the get_event_info function.
Definition: SCOREP_MetricPlugins.h:156
uint64_t reserved[92]
Definition: SCOREP_MetricPlugins.h:380
SCOREP_MetricSynchronicity
Definition: SCOREP_MetricTypes.h:217
uint32_t plugin_version
Definition: SCOREP_MetricPlugins.h:190
SCOREP_MetricPer run_per
Definition: SCOREP_MetricPlugins.h:196
int32_t(* initialize)(void)
Definition: SCOREP_MetricPlugins.h:233