Lines Matching defs:list_name
127 static void show_list(func_call_list_t list_name)
132 if (i == 0 || list_name[i].stats[0] == 1 ) {
133 printf("%4d %-35s ", i, (i == 0)? "TOTAL" :list_name[i].func_name);
137 if (list_name[i].stats[j] == 0) {
139 if (list_name[i].stats[k] != 0) {
148 printf(" %7"PRIu64" ", list_name[i].stats[j]);
159 func_call_list_t list_name = pbuf_alloc_calls;
160 pbuf_alloc_TX_packets = list_name[0].stats[3];
161 pbuf_alloc_RX_packets = list_name[0].stats[4];
166 show_list(list_name);
173 func_call_list_t list_name = pbuf_free_calls;
174 pbuf_free_TX_packets = list_name[0].stats[3];
175 pbuf_free_RX_packets = list_name[0].stats[4];
179 show_list(list_name);
183 static int locate_key(func_call_list_t list_name, char *key)
187 if (list_name[i].stats[0] != 1) {
190 if (strncmp(list_name[i].func_name, key, 256) == 0) {
197 static int add_key(func_call_list_t list_name, char *key)
201 if (list_name[i].stats[0] != 1) {
202 list_name[i].stats[0] = 1;
203 strncpy(list_name[i].func_name, key, 256);
210 static void increment_stats(func_call_list_t list_name, int idx, int type)
213 list_name[idx].stats[type] = list_name[idx].stats[type] + 1;
216 list_name[0].stats[type] = list_name[0].stats[type] + 1;
221 static void increment_calls(func_call_list_t list_name, int type,
226 int idx = locate_key(list_name, key);
228 idx = add_key(list_name, key);
234 increment_stats(list_name, idx, type);