93 #define MAX_PENDING_EVENT 4096
149 return &__trace_module->
infos;
157 if( !__trace_module )
180 if( !__trace_module )
194 event->timestamp = timestamp;
195 event->duration = duration;
205 event->tid = stream_infos->
tid;
207 event->rank = stream_infos->
mpi_rank;
struct Stream_Descriptor infos
The stream descriptor.
uint64_t partition_id
The id of the partition.
struct Chained_List streams
The list of managed streams.
static struct Stream_Manager * Stream_Manager()
A getter for the stream manager.
static struct Stream_Descriptor * Stream_desc_get()
Getter on the current Stream_Descriptor.
void Stream_Infos_release(struct Stream_Infos *info)
Releases a Stream_Infos.
volatile uint8_t is_in_mpi_call
1 if we are in a MPI call
uint64_t tid
id of the stream (see Stream_MGR_gen_id())
Stream_type
enum defining the type of the source of the stream
Struct defining a stream manager.
This is a struct defining a FIFO It is composed of several Buffered_FIFO_chunk.
Structure containing data related to a stream and intended to be sent as an event (see MALP_Trace_Eve...
static void MALP_Trace_Event_fill(struct MALP_Trace_Event *event, MALP_Trace_event_type type, uint64_t timestamp, uint64_t duration)
static void Stream_Infos_leave_mpi()
Indicates to the current Stream_Infos (if any) that we are leaving a MPI call.
struct Stream_Infos * Stream_MGR_new_stream(struct Stream_Descriptor *parent, Stream_type type)
Adds a stream into the current stream manager.
struct Stream_Infos * __trace_module
This is a global Stream_Infos (not shared between threads)
Struct defining an event.
This a structure wrapps the use of chained_list This is the main chain list structure to use...
static int Stream_Infos_is_in_mpi()
Checks if we are currently inside a MPI call.
Structure describing a stream.
uint64_t mpi_rank
mpi rank of the source of the stream
struct Buffered_FIFO mpi_wrapped_event_buffer
FIFO of events for MPI calls.
MALP_Spinlock lock
the lock for concurrent access
static struct Stream_Infos * Stream_infos_get()
Getter on the current Stream_Infos.
void Stream_Manager_init()
Initialises the manager for current MPI process.
struct Stream_Manager __stream_Stream_Manager
The stream manager for current MPI process.
MALP_Trace_event_type
enum defining event types
Stream_type type
the type of the source of the steram
void Stream_MGR_end_stream()
Signals end of stream.
volatile unsigned int MALP_Spinlock
The type of spinlocks in MALP.
int rank
the rank (within the partition
static void Stream_Infos_enter_mpi()
Indicates to the current Stream_Infos (if any) that we are enterning a MPI call.
static int VMPI_Get_partition_id()
Returns the unique ID of the current partition.
void Stream_Infos_init(struct Stream_Infos *info)
Initializes a Stream_Infos.
static void Stream_infos_set(struct Stream_Infos *sd)
Setter on the current Stream_Infos.
void Stream_Manager_release()
Releases the manager for current MPI process (including all streams )
uint64_t current_id
a globally unique id for the streams