Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OTF_Event_forge.h
Go to the documentation of this file.
1 /* ############################ MALP License ############################## */
2 /* # Fri Jan 18 14:00:00 CET 2013 # */
3 /* # Copyright or (C) or Copr. Commissariat a l'Energie Atomique # */
4 /* # # */
5 /* # This software is governed by the CeCILL-C license under French law # */
6 /* # and abiding by the rules of distribution of free software. You can # */
7 /* # use, modify and/ or redistribute the software under the terms of # */
8 /* # the CeCILL-C license as circulated by CEA, CNRS and INRIA at the # */
9 /* # following URL http://www.cecill.info. # */
10 /* # # */
11 /* # The fact that you are presently reading this means that you have # */
12 /* # had knowledge of the CeCILL-C license and that you accept its # */
13 /* # terms. # */
14 /* # # */
15 /* # Authors: # */
16 /* # - BESNARD Jean-Baptiste jean-baptiste.besnard@cea.fr # */
17 /* # # */
18 /* ######################################################################## */
19 #ifndef OTF_EVENT_FORGE_H
20 #define OTF_EVENT_FORGE_H
21 
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26 
27 #include <stdint.h>
28 #include <string.h>
29 #include "Event_Desc.h"
30 
31 
32 
37 typedef enum {
43 
46 
47 static const char * const OTF_Event_names[MALP_OTF_ANALYSER_INFO_COUNT]=
48 {
49  "",
50  "Node",
51  "MALP Instrumented program",
52  "Malp_Analysis",
53  "Fake Function"
54 };
55 
56 #define OTF_EVENT_COUNT (MALP_OTF_ANALYSER_INFO_COUNT + T_MPI_COUNT + T_POSIX_COUNT)
57 
58 static inline uint64_t OTF_Event_count()
59 {
60  return OTF_EVENT_COUNT;
61 }
62 
63 char * OTF_Event_resolve( uint64_t str_id );
64 int OTF_Event_set( uint64_t str_id , char *data );
65 
66 
67 int OTF_Event_forge( struct MALP_Trace_Event *otf_event, OTF_Event_type enterleave,
68  MALP_Trace_event_type type, uint64_t subtype );
69 
70 void OTF_Event_print( struct MALP_Trace_Event *otf_event);
71 
72 
75 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* OTF_EVENT_FORGE_H */
#define OTF_EVENT_COUNT
static const char *const OTF_Event_names[MALP_OTF_ANALYSER_INFO_COUNT]
void OTF_Event_print(struct MALP_Trace_Event *otf_event)
void OTF_Event_forge_init()
char * OTF_Event_resolve(uint64_t str_id)
Struct defining an event.
Definition: Event_Desc.h:82
static uint64_t OTF_Event_count()
int64_t str_id
Definition: OTF_Event.h:48
MALP_Trace_event_type
enum defining event types
Definition: Event_Desc.h:41
int OTF_Event_forge(struct MALP_Trace_Event *otf_event, OTF_Event_type enterleave, MALP_Trace_event_type type, uint64_t subtype)
void OTF_Event_forge_release()
OTF_Event_type
Definition: OTF_Event.h:29
int OTF_Event_set(uint64_t str_id, char *data)
OTF_Event_reserved_str
OTF2 id enumeration for basic information on archive.
OTF_Event_type type
Definition: OTF_Event.h:45