GTGPaje_Basic.h
Go to the documentation of this file.
#ifndef _GTG_PAJE_BASIC_H_
#define _GTG_PAJE_BASIC_H_
#include "GTGBasic.h"
#define FMT_PAJE 0
#define FMT_VITE 1
trace_return_t pajeInitTrace (const char* filename, int rank, gtg_flag_t flags, int fmt);
char* pajeGetName (int rk);
trace_return_t pajeSetCompress(int val);
trace_return_t pajeAddContType (const char* alias, const char* contType,
const char* name);
trace_return_t pajeAddStateType (const char* alias, const char* contType,
const char* name);
trace_return_t pajeAddEventType (const char* alias, const char* contType,
const char* name);
trace_return_t pajeAddLinkType (const char* alias , const char* name,
const char* contType, const char* srcContType,
const char* destContType);
trace_return_t pajeAddVarType (const char* alias , const char* contType,
const char* name);
trace_return_t pajeAddEntityValue (const char* alias, const char* entType,
const char* name , const char* color);
trace_return_t pajeAddContainer (varPrec time, const char* alias ,
const char* type, const char* container,
const char* name, const char* file);
trace_return_t pajeSeqAddContainer (varPrec time, const char* alias ,
const char* type, const char* container,
const char* name);
trace_return_t pajeDestroyContainer (varPrec time, const char* name,
const char* type);
trace_return_t pajeSetState (varPrec time, const char* type,
const char* cont, const char* val);
trace_return_t pajePushState (varPrec time, const char* type,
const char* cont, const char* val);
trace_return_t pajePopState (varPrec time, const char* type,
const char* cont);
trace_return_t pajeAddEvent (varPrec time, const char* type,
const char* cont, const char* val);
trace_return_t pajeStartLink (varPrec time, const char* type,
const char* cont, const char* src,
const char* val , const char* key);
trace_return_t pajeEndLink (varPrec time, const char* type,
const char* cont, const char* dest,
const char* val , const char* key);
trace_return_t pajeSetVar (varPrec time, const char* type,
const char* cont, varPrec val);
trace_return_t pajeAddVar (varPrec time, const char* type,
const char* cont, varPrec val);
trace_return_t pajeSubVar (varPrec time, const char* type,
const char* cont, varPrec val);
trace_return_t pajeAddComment (const char* comment);
trace_return_t pajeEndTrace ();
trace_return_t viteEndTrace ();
/*
* Functions to handle extra-parameters in the Paje Definitions
* This will need to be cleaned to be closer to OTF interface
*/
enum gtg_paje_evtdef_e {
GTG_PAJE_EVTDEF_DefineContainerType,
GTG_PAJE_EVTDEF_DefineStateType,
GTG_PAJE_EVTDEF_DefineEventType,
GTG_PAJE_EVTDEF_DefineVariableType,
GTG_PAJE_EVTDEF_DefineLinkType,
GTG_PAJE_EVTDEF_DefineEntityValue,
GTG_PAJE_EVTDEF_CreateContainer,
GTG_PAJE_EVTDEF_DestroyContainer,
GTG_PAJE_EVTDEF_SetState,
GTG_PAJE_EVTDEF_PushState,
GTG_PAJE_EVTDEF_PopState,
GTG_PAJE_EVTDEF_ResetState,
GTG_PAJE_EVTDEF_NewEvent,
GTG_PAJE_EVTDEF_SetVariable,
GTG_PAJE_EVTDEF_AddVariable,
GTG_PAJE_EVTDEF_SubVariable,
GTG_PAJE_EVTDEF_StartLink,
GTG_PAJE_EVTDEF_EndLink,
GTG_PAJE_EVTDEF_NBR
};
enum gtg_paje_fieldtype_e {
GTG_PAJE_FIELDTYPE_Int,
GTG_PAJE_FIELDTYPE_Hex,
GTG_PAJE_FIELDTYPE_Date,
GTG_PAJE_FIELDTYPE_Double,
GTG_PAJE_FIELDTYPE_String,
GTG_PAJE_FIELDTYPE_Color,
GTG_PAJE_FIELDTYPE_NBR
};
struct gtg_paje_edp_s {
struct gtg_paje_edp_s *next;
char *name;
enum gtg_paje_fieldtype_e type;
};
typedef struct gtg_paje_edp_s gtg_paje_edp_t;
struct gtg_paje_eventdef_s {
char *name;
int id;
gtg_paje_edp_t *first;
gtg_paje_edp_t *last;
};
typedef struct gtg_paje_eventdef_s gtg_paje_eventdef_t;
extern gtg_paje_eventdef_t paje_eventdefs[GTG_PAJE_EVTDEF_NBR];
void pajeEventDefAddParam( enum gtg_paje_evtdef_e event, const char *name,
enum gtg_paje_fieldtype_e type );
#endif /* _GTG_PAJE_BASIC_H_ */
pajeSeqAddContainer
trace_return_t pajeSeqAddContainer(varPrec time, const char *alias, const char *type, const char *container, const char *name)
Add a Container (PAJE format).
GTG_PAJE_EVTDEF_ResetState
Definition: GTGPaje_Basic.h:431
GTG_PAJE_FIELDTYPE_NBR
Definition: GTGPaje_Basic.h:448
pajePopState
trace_return_t pajePopState(varPrec time, const char *type, const char *cont)
Revert the State of a Container to its previous value.
pajeAddVarType
trace_return_t pajeAddVarType(const char *alias, const char *contType, const char *name)
Add a Variable Type.
gtg_paje_eventdef_s::id
int id
Definition: GTGPaje_Basic.h:460
viteEndTrace
trace_return_t viteEndTrace()
Finalize a VITE trace.
varPrec
double varPrec
Use the double precision type for time and value.
Definition: GTGTypes.h:28
pajeAddContainer
trace_return_t pajeAddContainer(varPrec time, const char *alias, const char *type, const char *container, const char *name, const char *file)
Add a Container (VITE format).
paje_eventdefs
gtg_paje_eventdef_t paje_eventdefs[GTG_PAJE_EVTDEF_NBR]
pajeAddComment
trace_return_t pajeAddComment(const char *comment)
Add some Comment in Trace file.
GTG_PAJE_EVTDEF_PushState
Definition: GTGPaje_Basic.h:429
pajeDestroyContainer
trace_return_t pajeDestroyContainer(varPrec time, const char *name, const char *type)
Destroy a Container.
gtg_flag_t
uint8_t gtg_flag_t
Flags that can be specified to GTG.
Definition: GTG_EZTrace.h:51
GTG_PAJE_EVTDEF_DefineEntityValue
Definition: GTGPaje_Basic.h:424
GTG_PAJE_FIELDTYPE_String
Definition: GTGPaje_Basic.h:446
pajeAddEntityValue
trace_return_t pajeAddEntityValue(const char *alias, const char *entType, const char *name, const char *color)
Add an Entity Value.
GTG_PAJE_FIELDTYPE_Hex
Definition: GTGPaje_Basic.h:443
pajeEventDefAddParam
void pajeEventDefAddParam(enum gtg_paje_evtdef_e event, const char *name, enum gtg_paje_fieldtype_e type)
gtg_paje_eventdef_s::last
gtg_paje_edp_t * last
Definition: GTGPaje_Basic.h:462
gtg_paje_eventdef_s
Definition: GTGPaje_Basic.h:458
gtg_paje_edp_s::name
char * name
Definition: GTGPaje_Basic.h:453
pajeAddStateType
trace_return_t pajeAddStateType(const char *alias, const char *contType, const char *name)
Add a State Type.
GTG_PAJE_EVTDEF_SetVariable
Definition: GTGPaje_Basic.h:433
gtg_paje_edp_s
Definition: GTGPaje_Basic.h:451
GTG_PAJE_EVTDEF_NBR
Definition: GTGPaje_Basic.h:438
GTG_PAJE_EVTDEF_PopState
Definition: GTGPaje_Basic.h:430
gtg_paje_eventdef_s::name
char * name
Definition: GTGPaje_Basic.h:459
trace_return_t
trace_return_t
Define various return values.
Definition: GTGTypes.h:35
GTG_PAJE_EVTDEF_DefineEventType
Definition: GTGPaje_Basic.h:421
pajeAddEvent
trace_return_t pajeAddEvent(varPrec time, const char *type, const char *cont, const char *val)
Add an Event.
gtg_paje_eventdef_s::first
gtg_paje_edp_t * first
Definition: GTGPaje_Basic.h:461
pajeAddEventType
trace_return_t pajeAddEventType(const char *alias, const char *contType, const char *name)
Add an Event Type.
GTG_PAJE_EVTDEF_SetState
Definition: GTGPaje_Basic.h:428
gtg_paje_edp_s::next
struct gtg_paje_edp_s * next
Definition: GTGPaje_Basic.h:452
pajeSubVar
trace_return_t pajeSubVar(varPrec time, const char *type, const char *cont, varPrec val)
Substract a value from a Variable.
GTG_PAJE_EVTDEF_SubVariable
Definition: GTGPaje_Basic.h:435
GTG_PAJE_EVTDEF_DefineVariableType
Definition: GTGPaje_Basic.h:422
pajeEndTrace
trace_return_t pajeEndTrace()
Finalize a PAJE trace.
GTGBasic.h
GTGBasic is a basic interface to generate trace in various formats.
pajeAddContType
trace_return_t pajeAddContType(const char *alias, const char *contType, const char *name)
Add a Container Type.
pajeSetVar
trace_return_t pajeSetVar(varPrec time, const char *type, const char *cont, varPrec val)
Set a Variable value.
GTG_PAJE_EVTDEF_CreateContainer
Definition: GTGPaje_Basic.h:426
GTG_PAJE_EVTDEF_DestroyContainer
Definition: GTGPaje_Basic.h:427
pajeGetName
char * pajeGetName(int rk)
Function to get the name of the file containing all the data for the proc of rank rk...
pajePushState
trace_return_t pajePushState(varPrec time, const char *type, const char *cont, const char *val)
Save the current State on a stack and change the State of a Container.
GTG_PAJE_EVTDEF_NewEvent
Definition: GTGPaje_Basic.h:432
gtg_paje_edp_s::type
enum gtg_paje_fieldtype_e type
Definition: GTGPaje_Basic.h:454
GTG_PAJE_FIELDTYPE_Date
Definition: GTGPaje_Basic.h:444
GTG_PAJE_EVTDEF_AddVariable
Definition: GTGPaje_Basic.h:434
GTG_PAJE_FIELDTYPE_Int
Definition: GTGPaje_Basic.h:442
GTG_PAJE_FIELDTYPE_Color
Definition: GTGPaje_Basic.h:447
pajeAddLinkType
trace_return_t pajeAddLinkType(const char *alias, const char *name, const char *contType, const char *srcContType, const char *destContType)
Add a Link Type.
GTG_PAJE_EVTDEF_DefineContainerType
Definition: GTGPaje_Basic.h:419
pajeSetCompress
trace_return_t pajeSetCompress(int val)
Enable trace compression.
pajeEndLink
trace_return_t pajeEndLink(varPrec time, const char *type, const char *cont, const char *dest, const char *val, const char *key)
Start a link.
pajeInitTrace
trace_return_t pajeInitTrace(const char *filename, int rank, gtg_flag_t flags, int fmt)
Initialize a VITE trace ( *.ept)
GTG_PAJE_EVTDEF_EndLink
Definition: GTGPaje_Basic.h:437
GTG_PAJE_EVTDEF_DefineLinkType
Definition: GTGPaje_Basic.h:423
gtg_paje_evtdef_e
gtg_paje_evtdef_e
Definition: GTGPaje_Basic.h:418
GTG_PAJE_FIELDTYPE_Double
Definition: GTGPaje_Basic.h:445
GTG_PAJE_EVTDEF_StartLink
Definition: GTGPaje_Basic.h:436
pajeAddVar
trace_return_t pajeAddVar(varPrec time, const char *type, const char *cont, varPrec val)
Add a value to a Variable.
pajeStartLink
trace_return_t pajeStartLink(varPrec time, const char *type, const char *cont, const char *src, const char *val, const char *key)
Start a link.
pajeSetState
trace_return_t pajeSetState(varPrec time, const char *type, const char *cont, const char *val)
Set the State of a Container.
GTG_PAJE_EVTDEF_DefineStateType
Definition: GTGPaje_Basic.h:420
gtg_paje_fieldtype_e
gtg_paje_fieldtype_e
Definition: GTGPaje_Basic.h:441