• Home
  • Raw
  • Download

Lines Matching refs:nodes

20 void tst_nodemap_print_counters(struct tst_nodemap *nodes)  in tst_nodemap_print_counters()  argument
24 for (i = 0; i < nodes->cnt; i++) { in tst_nodemap_print_counters()
26 nodes->map[i], nodes->counters[i]); in tst_nodemap_print_counters()
30 void tst_nodemap_reset_counters(struct tst_nodemap *nodes) in tst_nodemap_reset_counters() argument
32 size_t arr_size = sizeof(unsigned int) * nodes->cnt; in tst_nodemap_reset_counters()
34 if (!nodes->counters) in tst_nodemap_reset_counters()
35 nodes->counters = SAFE_MALLOC(arr_size); in tst_nodemap_reset_counters()
37 memset(nodes->counters, 0, arr_size); in tst_nodemap_reset_counters()
40 void tst_nodemap_free(struct tst_nodemap *nodes) in tst_nodemap_free() argument
42 free(nodes->counters); in tst_nodemap_free()
43 free(nodes); in tst_nodemap_free()
67 static void inc_counter(unsigned int node, struct tst_nodemap *nodes) in inc_counter() argument
71 for (i = 0; i < nodes->cnt; i++) { in inc_counter()
72 if (nodes->map[i] == node) { in inc_counter()
73 nodes->counters[i]++; in inc_counter()
79 void tst_nodemap_count_pages(struct tst_nodemap *nodes, in tst_nodemap_count_pages() argument
99 inc_counter(node, nodes); in tst_nodemap_count_pages()
177 struct tst_nodemap *nodes; in tst_get_nodemap() local
195 nodes = SAFE_MALLOC(sizeof(struct tst_nodemap) in tst_get_nodemap()
197 nodes->cnt = cnt; in tst_get_nodemap()
198 nodes->counters = NULL; in tst_get_nodemap()
207 nodes->map[cnt++] = i; in tst_get_nodemap()
210 nodes->cnt = cnt; in tst_get_nodemap()
214 return nodes; in tst_get_nodemap()