| 99 | } |
| 100 | |
| 101 | static void |
| 102 | mutex_stats_init_cols(emitter_row_t *row, const char *table_name, |
| 103 | emitter_col_t *name, |
| 104 | emitter_col_t col_uint64_t[mutex_prof_num_uint64_t_counters], |
| 105 | emitter_col_t col_uint32_t[mutex_prof_num_uint32_t_counters]) { |
| 106 | mutex_prof_uint64_t_counter_ind_t k_uint64_t = 0; |
| 107 | mutex_prof_uint32_t_counter_ind_t k_uint32_t = 0; |
| 108 | |
| 109 | emitter_col_t *col; |
| 110 | |
| 111 | if (name != NULL) { |
| 112 | emitter_col_init(name, row); |
| 113 | name->justify = emitter_justify_left; |
| 114 | name->width = 21; |
| 115 | name->type = emitter_type_title; |
| 116 | name->str_val = table_name; |
| 117 | } |
| 118 | |
| 119 | #define WIDTH_uint32_t 12 |
| 120 | #define WIDTH_uint64_t 16 |
| 121 | #define OP(counter, counter_type, human, derived, base_counter) \ |
| 122 | col = &col_##counter_type[k_##counter_type]; \ |
| 123 | ++k_##counter_type; \ |
| 124 | emitter_col_init(col, row); \ |
| 125 | col->justify = emitter_justify_right; \ |
| 126 | col->width = derived ? 8 : WIDTH_##counter_type; \ |
| 127 | col->type = emitter_type_title; \ |
| 128 | col->str_val = human; |
| 129 | MUTEX_PROF_COUNTERS |
| 130 | #undef OP |
| 131 | #undef WIDTH_uint32_t |
| 132 | #undef WIDTH_uint64_t |
| 133 | col_uint64_t[mutex_counter_total_wait_time_ps].width = 10; |
| 134 | } |
| 135 | |
| 136 | static void |
| 137 | mutex_stats_read_global(const char *name, emitter_col_t *col_name, |
no test coverage detected