KMR
kmrtrace.h
Go to the documentation of this file.
1 /* kmrtrace.h (2015-10-14) */
2 /* Copyright (C) 2012-2016 RIKEN AICS */
3 
4 #ifndef _KMRTRACE_H
5 #define _KMRTRACE_H
6 #pragma once
7 
8 /** \file kmrtrace.h KMRViz tracing Support. */
9 
10 #define KT_PATHLEN 512
11 #define KT_ENDIAN_CHECKER 0xdeadbeef
12 
13 /** Current supported trace events */
14 typedef enum {
15  KMR_TRACE_EVENT_START, /* dummy for KMRViz */
16  KMR_TRACE_EVENT_END, /* dummy for KMRViz */
17  KMR_TRACE_EVENT_MAP,
18  KMR_TRACE_EVENT_MAP_ONCE,
19  KMR_TRACE_EVENT_SHUFFLE,
20  KMR_TRACE_EVENT_REDUCE,
21  KMR_TRACE_EVENT_SORT,
22  KMR_TRACE_EVENT_REPLICATE,
24 
25 /* A trace entry is a point in time of the trace,
26  it includes the time point and the type of event occurring at that time */
27 typedef struct kmr_trace_entry {
28  double t;
30  long kvi_element_count;
31  long kvo_element_count;
32  struct kmr_trace_entry * pair;
33  struct kmr_trace_entry * next;
35 
36 /* The trace of one processor core (rank) */
37 struct kmr_trace {
38  int rank;
39  double start_t;
40  double end_t;
41  long n;
42  kmr_trace_entry_t * head;
43  kmr_trace_entry_t * tail;
44 };
45 
46 extern void kmr_trace_initialize(KMR *mr);
47 extern void kmr_trace_finalize(KMR *mr);
48 extern kmr_trace_entry_t *
50  KMR_KVS * kvi, KMR_KVS * kvo);
51 
52 /*
53 Copyright (C) 2012-2016 RIKEN AICS
54 This library is distributed WITHOUT ANY WARRANTY. This library can be
55 redistributed and/or modified under the terms of the BSD 2-Clause License.
56 */
57 
58 #endif /* _KMRTRACE_H */
Key-Value Stream (abstract).
Definition: kmr.h:587
kmr_trace_entry_t * kmr_trace_add_entry(KMR *mr, kmr_trace_event_t ev, kmr_trace_entry_t *pre, KMR_KVS *kvi, KMR_KVS *kvo)
Add an entry to the trace.
Definition: kmrtrace.c:174
KMR Context.
Definition: kmr.h:222
Definition: kmrtrace.h:27
void kmr_trace_initialize(KMR *mr)
Initialize a trace.
Definition: kmrtrace.c:153
void kmr_trace_finalize(KMR *mr)
Finalize a trace.
Definition: kmrtrace.c:162
kmr_trace_event_t
Current supported trace events.
Definition: kmrtrace.h:14