7.0 (revision 7784de1c)
SCOREP_MetricPlugins.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Score-P software (http://www.score-p.org)
3  *
4  * Copyright (c) 2009-2013,
5  * RWTH Aachen University, Germany
6  *
7  * Copyright (c) 2009-2013,
8  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
9  *
10  * Copyright (c) 2009-2013, 2015-2016,
11  * Technische Universitaet Dresden, Germany
12  *
13  * Copyright (c) 2009-2013,
14  * University of Oregon, Eugene, USA
15  *
16  * Copyright (c) 2009-2013,
17  * Forschungszentrum Juelich GmbH, Germany
18  *
19  * Copyright (c) 2009-2013,
20  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
21  *
22  * Copyright (c) 2009-2013,
23  * Technische Universitaet Muenchen, Germany
24  *
25  * This software may be modified and distributed under the terms of
26  * a BSD-style license. See the COPYING file in the package base
27  * directory for details.
28  *
29  */
30 
39 #ifndef SCOREP_METRIC_PLUGINS_H
40 #define SCOREP_METRIC_PLUGINS_H
41 
145 #include <stdbool.h>
146 
148 
149 
151 #define SCOREP_METRIC_PLUGIN_VERSION 1
152 
153 #ifdef __cplusplus
154 # define EXTERN extern "C"
155 #else
156 # define EXTERN extern
157 #endif
158 
160 #define SCOREP_METRIC_PLUGIN_ENTRY( _name ) \
161  EXTERN SCOREP_Metric_Plugin_Info \
162  SCOREP_MetricPlugin_ ## _name ## _get_info( void )
163 
164 
165 /* *********************************************************************
166  * Type definitions
167  **********************************************************************/
168 
174 {
176  char* name;
178  char* description;
188  int64_t exponent;
190  char* unit;
192 
198 {
199  /*
200  * For all plugins
201  */
202 
207  uint32_t plugin_version;
208 
214 
222 
238  uint64_t delta_t;
239 
250  int32_t ( * initialize )( void );
251 
256  void ( * finalize )( void );
257 
279  SCOREP_Metric_Plugin_MetricProperties* ( *get_event_info )( char* token );
280 
295  int32_t ( * add_counter )( char* metric_name );
296 
310  uint64_t ( * get_current_value )( int32_t id );
311 
327  bool ( * get_optional_value )( int32_t id,
328  uint64_t* value );
329 
339  void ( * set_clock_function )( uint64_t ( * clock_time )( void ) );
340 
363  uint64_t ( * get_all_values )( int32_t id,
364  SCOREP_MetricTimeValuePair** time_value_list );
365 
366  /* Since of Score-P metric plugin interface version 1 */
367 
392  void ( * synchronize )( bool is_responsible,
394 
395 
397  uint64_t reserved[ 92 ];
399 
400 
401 #endif /* SCOREP_METRIC_PLUGINS_H */
SCOREP_MetricSynchronizationMode
Definition: SCOREP_MetricTypes.h:297
SCOREP_MetricBase
Definition: SCOREP_MetricTypes.h:165
Definition: SCOREP_MetricPlugins.h:197
void(* set_clock_function)(uint64_t(*clock_time)(void))
Definition: SCOREP_MetricPlugins.h:339
bool(* get_optional_value)(int32_t id, uint64_t *value)
Definition: SCOREP_MetricPlugins.h:327
SCOREP_MetricBase base
Definition: SCOREP_MetricPlugins.h:186
SCOREP_MetricPer
Definition: SCOREP_MetricTypes.h:205
uint64_t delta_t
Definition: SCOREP_MetricPlugins.h:238
SCOREP_MetricValueType
Definition: SCOREP_MetricTypes.h:97
uint64_t(* get_current_value)(int32_t id)
Definition: SCOREP_MetricPlugins.h:310
Definition: SCOREP_MetricTypes.h:285
SCOREP_MetricMode
Definition: SCOREP_MetricTypes.h:133
void(* finalize)(void)
Definition: SCOREP_MetricPlugins.h:256
SCOREP_MetricMode mode
Definition: SCOREP_MetricPlugins.h:182
char * name
Definition: SCOREP_MetricPlugins.h:176
uint64_t(* get_all_values)(int32_t id, SCOREP_MetricTimeValuePair **time_value_list)
Definition: SCOREP_MetricPlugins.h:363
Types used by metric service.
SCOREP_MetricValueType value_type
Definition: SCOREP_MetricPlugins.h:184
void(* synchronize)(bool is_responsible, SCOREP_MetricSynchronizationMode sync_mode)
Definition: SCOREP_MetricPlugins.h:392
int64_t exponent
Definition: SCOREP_MetricPlugins.h:188
char * unit
Definition: SCOREP_MetricPlugins.h:190
int32_t(* add_counter)(char *metric_name)
Definition: SCOREP_MetricPlugins.h:295
SCOREP_MetricSynchronicity sync
Definition: SCOREP_MetricPlugins.h:221
char * description
Definition: SCOREP_MetricPlugins.h:178
Properties describing a metric. Provided by the get_event_info function.
Definition: SCOREP_MetricPlugins.h:173
uint64_t reserved[92]
Definition: SCOREP_MetricPlugins.h:397
SCOREP_MetricSynchronicity
Definition: SCOREP_MetricTypes.h:234
uint32_t plugin_version
Definition: SCOREP_MetricPlugins.h:207
SCOREP_MetricPer run_per
Definition: SCOREP_MetricPlugins.h:213
int32_t(* initialize)(void)
Definition: SCOREP_MetricPlugins.h:250