Lines Matching refs:i
38 void tracing_map_update_sum(struct tracing_map_elt *elt, unsigned int i, u64 n) in tracing_map_update_sum() argument
40 atomic64_add(n, &elt->fields[i].sum); in tracing_map_update_sum()
55 u64 tracing_map_read_sum(struct tracing_map_elt *elt, unsigned int i) in tracing_map_read_sum() argument
57 return (u64)atomic64_read(&elt->fields[i].sum); in tracing_map_read_sum()
70 void tracing_map_set_var(struct tracing_map_elt *elt, unsigned int i, u64 n) in tracing_map_set_var() argument
72 atomic64_set(&elt->vars[i], n); in tracing_map_set_var()
73 elt->var_set[i] = true; in tracing_map_set_var()
85 bool tracing_map_var_set(struct tracing_map_elt *elt, unsigned int i) in tracing_map_var_set() argument
87 return elt->var_set[i]; in tracing_map_var_set()
102 u64 tracing_map_read_var(struct tracing_map_elt *elt, unsigned int i) in tracing_map_read_var() argument
104 return (u64)atomic64_read(&elt->vars[i]); in tracing_map_read_var()
121 u64 tracing_map_read_var_once(struct tracing_map_elt *elt, unsigned int i) in tracing_map_read_var_once() argument
123 elt->var_set[i] = false; in tracing_map_read_var_once()
124 return (u64)atomic64_read(&elt->vars[i]); in tracing_map_read_var_once()
288 unsigned int i; in tracing_map_array_clear() local
293 for (i = 0; i < a->n_pages; i++) in tracing_map_array_clear()
294 memset(a->pages[i], 0, PAGE_SIZE); in tracing_map_array_clear()
299 unsigned int i; in tracing_map_array_free() local
307 for (i = 0; i < a->n_pages; i++) { in tracing_map_array_free()
308 if (!a->pages[i]) in tracing_map_array_free()
310 free_page((unsigned long)a->pages[i]); in tracing_map_array_free()
323 unsigned int i; in tracing_map_array_alloc() local
341 for (i = 0; i < a->n_pages; i++) { in tracing_map_array_alloc()
342 a->pages[i] = (void *)get_zeroed_page(GFP_KERNEL); in tracing_map_array_alloc()
343 if (!a->pages[i]) in tracing_map_array_alloc()
357 unsigned i; in tracing_map_elt_clear() local
359 for (i = 0; i < elt->map->n_fields; i++) in tracing_map_elt_clear()
360 if (elt->fields[i].cmp_fn == tracing_map_cmp_atomic64) in tracing_map_elt_clear()
361 atomic64_set(&elt->fields[i].sum, 0); in tracing_map_elt_clear()
363 for (i = 0; i < elt->map->n_vars; i++) { in tracing_map_elt_clear()
364 atomic64_set(&elt->vars[i], 0); in tracing_map_elt_clear()
365 elt->var_set[i] = false; in tracing_map_elt_clear()
374 unsigned int i; in tracing_map_elt_init_fields() local
378 for (i = 0; i < elt->map->n_fields; i++) { in tracing_map_elt_init_fields()
379 elt->fields[i].cmp_fn = elt->map->fields[i].cmp_fn; in tracing_map_elt_init_fields()
381 if (elt->fields[i].cmp_fn != tracing_map_cmp_atomic64) in tracing_map_elt_init_fields()
382 elt->fields[i].offset = elt->map->fields[i].offset; in tracing_map_elt_init_fields()
466 unsigned int i; in tracing_map_free_elts() local
471 for (i = 0; i < map->max_elts; i++) { in tracing_map_free_elts()
472 tracing_map_elt_free(*(TRACING_MAP_ELT(map->elts, i))); in tracing_map_free_elts()
473 *(TRACING_MAP_ELT(map->elts, i)) = NULL; in tracing_map_free_elts()
482 unsigned int i; in tracing_map_alloc_elts() local
489 for (i = 0; i < map->max_elts; i++) { in tracing_map_alloc_elts()
490 *(TRACING_MAP_ELT(map->elts, i)) = tracing_map_elt_alloc(map); in tracing_map_alloc_elts()
491 if (IS_ERR(*(TRACING_MAP_ELT(map->elts, i)))) { in tracing_map_alloc_elts()
492 *(TRACING_MAP_ELT(map->elts, i)) = NULL; in tracing_map_alloc_elts()
692 unsigned int i; in tracing_map_clear() local
700 for (i = 0; i < map->max_elts; i++) in tracing_map_clear()
701 tracing_map_elt_clear(*(TRACING_MAP_ELT(map->elts, i))); in tracing_map_clear()
766 unsigned int i; in tracing_map_create() local
791 for (i = 0; i < TRACING_MAP_KEYS_MAX; i++) in tracing_map_create()
792 map->key_idx[i] = -1; in tracing_map_create()
926 unsigned int i; in tracing_map_destroy_sort_entries() local
928 for (i = 0; i < n_entries; i++) in tracing_map_destroy_sort_entries()
929 destroy_sort_entry(entries[i]); in tracing_map_destroy_sort_entries()
953 int i; in detect_dups() local
963 for (i = 1; i < n_entries; i++) { in detect_dups()
964 if (!memcmp(sort_entries[i]->key, key, key_size)) { in detect_dups()
968 key = sort_entries[i]->key; in detect_dups()
978 unsigned int i; in is_key() local
980 for (i = 0; i < map->n_keys; i++) in is_key()
981 if (map->key_idx[i] == field_idx) in is_key()
996 unsigned i, start = 0, n_sub = 1; in sort_secondary() local
1008 for (i = 0; i < n_entries - 1; i++) { in sort_secondary()
1009 const struct tracing_map_sort_entry **a = &entries[i]; in sort_secondary()
1010 const struct tracing_map_sort_entry **b = &entries[i + 1]; in sort_secondary()
1014 if (i < n_entries - 2) in sort_secondary()
1019 start = i + 1; in sort_secondary()
1030 start = i + 1; in sort_secondary()
1067 int i, n_entries, ret; in tracing_map_sort_entries() local
1073 for (i = 0, n_entries = 0; i < map->map_size; i++) { in tracing_map_sort_entries()
1076 entry = TRACING_MAP_ENTRY(map->map, i); in tracing_map_sort_entries()