6.0 (revision 14673)
Data Structures | Macros
SCOREP_SubstratePlugins.h File Reference

Description of the substrate plugin header. For information on how to use substrate plugins, please refer to section 'Substrate Plugins'. More...

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <scorep/SCOREP_PublicTypes.h>
#include <scorep/SCOREP_PublicHandles.h>
#include <scorep/SCOREP_SubstrateEvents.h>

Go to the source code of this file.

Data Structures

struct  SCOREP_SubstratePluginCallbacks
 
struct  SCOREP_SubstratePluginInfo
 

Macros

#define SCOREP_SUBSTRATE_PLUGIN_ENTRY(_name)
 
#define SCOREP_SUBSTRATE_PLUGIN_UNDEFINED_MANAGEMENT_FUNCTIONS   99
 
#define SCOREP_SUBSTRATE_PLUGIN_VERSION   2
 

Detailed Description

Description of the substrate plugin header. For information on how to use substrate plugins, please refer to section 'Substrate Plugins'.

Macro Definition Documentation

#define SCOREP_SUBSTRATE_PLUGIN_ENTRY (   _name)
Value:
EXTERN SCOREP_SubstratePluginInfo \
SCOREP_SubstratePlugin_ ## _name ## _get_info( void )

Macro used for implementation of the 'get_info' function

Examples:
print_regions.c.
#define SCOREP_SUBSTRATE_PLUGIN_UNDEFINED_MANAGEMENT_FUNCTIONS   99

This should be reduced by 1 for each new function added to SCOREP_SubstratePluginInfo

#define SCOREP_SUBSTRATE_PLUGIN_VERSION   2

Advice for developers

The developer of a substrate plugin should provide a README file which explains how to compile, install and use the plugin. In particular, the supported substrates should be described in the README file.

Each substrate plugin has to include SCOREP_SubstratePlugins.h and implement a 'get_info' function. Therefore, use the SCOREP_SUBSTRATE_PLUGIN_ENTRY macro and provide the name of the plugin library as the argument. The plugin library must be called libscorep_substrate_<libraryname>.so For example, the example substrate plugin libscorep_substrate_example.so should use SCOREP_SUBSTRATE_PLUGIN_ENTRY( example ). Substrate plugins that implement event functions should also include SCOREP_SubstrateEvents.h Plugin writers should also refer to SCOREP_PublicHandles.h and SCOREP_PublicTypes.h to handle SCOREP handles given in event functions.

Functions

See each function for details. All functions except init are optional!

init

Check requirements and initialize the plugin.

assign_id

The plugin gets an id that can be used later to store location specific data.

init_mpp

If an MPP paradigm is used, it will be initialized when this call occurs. If no MPP paradigm is used, this function will be called as well.

finalize

Finalization of Score-P.

create_location

Create a new location (e.g., when a thread is created)

delete_location

Delete an existing location

activate_cpu_location

Activate a CPU location to write events. Called, for example, after create_location on CPU locations.

deactivate_cpu_location

Deactivate a CPU location. Called, for example, before delete_location.

pre_unify

Called before the unify step, after the measurement.

write_data

Called after the measurement when writing data.

core_task_create

Create a task (e.g., an OpenMP task)

core_task_complete

Complete a task (e.g., an OpenMP task)

new_definition_handle

Called when a handle is defined, which could define, for example a region or a metric. Plugins can use callbacks to get meta data for this handle.

get_event_functions

Called twice with different modes. Get a list of events that shall be passed to the plugin.

set_callbacks

Called before get_event_functions. Set a list of callbacks so that the plugin can get meta data for handles.

undeclared

MUST be set to zero. Added for extendability.

Mandatory variable

plugin_version

Must be set to SCOREP_SUBSTRATE_PLUGIN_VERSIONCurrent version of Score-P substrate plugin interface

Examples:
print_regions.c.