|
25 | 25 | #include "uthash.h" |
26 | 26 | #include "darshan.h" |
27 | 27 | #include "darshan-dynamic.h" |
| 28 | +#include "darshan-heatmap.h" |
28 | 29 |
|
29 | 30 | #include <daos_types.h> |
30 | 31 | #include <daos_prop.h> |
@@ -119,6 +120,7 @@ struct daos_runtime |
119 | 120 | void *rec_id_hash; |
120 | 121 | void *oh_hash; |
121 | 122 | int obj_rec_count; |
| 123 | + darshan_record_id heatmap_id; |
122 | 124 | int frozen; /* flag to indicate that the counters should no longer be modified */ |
123 | 125 | }; |
124 | 126 |
|
@@ -227,6 +229,8 @@ static int my_rank = -1; |
227 | 229 | int64_t __tmp_sz = (int64_t)__sz; \ |
228 | 230 | struct darshan_common_val_counter *__cvc; \ |
229 | 231 | double __elapsed = __tm2-__tm1; \ |
| 232 | + /* heatmap to record traffic summary */ \ |
| 233 | + heatmap_update(daos_runtime->heatmap_id, HEATMAP_READ, __tmp_sz, __tm1, __tm2); \ |
230 | 234 | __rec_ref->object_rec->counters[__counter] += 1; \ |
231 | 235 | __rec_ref->object_rec->counters[DAOS_BYTES_READ] += __sz; \ |
232 | 236 | DARSHAN_BUCKET_INC(&(__rec_ref->object_rec->counters[DAOS_SIZE_READ_0_100]), __sz); \ |
@@ -255,6 +259,8 @@ static int my_rank = -1; |
255 | 259 | int64_t __tmp_sz = (int64_t)__sz; \ |
256 | 260 | struct darshan_common_val_counter *__cvc; \ |
257 | 261 | double __elapsed = __tm2-__tm1; \ |
| 262 | + /* heatmap to record traffic summary */ \ |
| 263 | + heatmap_update(daos_runtime->heatmap_id, HEATMAP_WRITE, __tmp_sz, __tm1, __tm2); \ |
258 | 264 | __rec_ref->object_rec->counters[__counter] += 1; \ |
259 | 265 | __rec_ref->object_rec->counters[DAOS_BYTES_WRITTEN] += __sz; \ |
260 | 266 | DARSHAN_BUCKET_INC(&(__rec_ref->object_rec->counters[DAOS_SIZE_WRITE_0_100]), __sz); \ |
@@ -1145,6 +1151,9 @@ static void daos_runtime_initialize() |
1145 | 1151 | } |
1146 | 1152 | memset(daos_runtime, 0, sizeof(*daos_runtime)); |
1147 | 1153 |
|
| 1154 | + /* register a heatmap */ |
| 1155 | + daos_runtime->heatmap_id = heatmap_register("heatmap:DAOS"); |
| 1156 | + |
1148 | 1157 | return; |
1149 | 1158 | } |
1150 | 1159 |
|
|
0 commit comments