Lines Matching refs:hist
186 bp_slots_histogram_alloc(struct bp_slots_histogram *hist, enum bp_type_idx type) in bp_slots_histogram_alloc() argument
188 hist->count = kcalloc(hw_breakpoint_slots_cached(type), sizeof(*hist->count), GFP_KERNEL); in bp_slots_histogram_alloc()
189 return hist->count; in bp_slots_histogram_alloc()
192 static __init void bp_slots_histogram_free(struct bp_slots_histogram *hist) in bp_slots_histogram_free() argument
194 kfree(hist->count); in bp_slots_histogram_free()
237 bp_slots_histogram_add(struct bp_slots_histogram *hist, int old, int val) in bp_slots_histogram_add() argument
243 WARN_ON(atomic_dec_return_relaxed(&hist->count[old_idx]) < 0); in bp_slots_histogram_add()
245 WARN_ON(atomic_inc_return_relaxed(&hist->count[new_idx]) < 0); in bp_slots_histogram_add()
249 bp_slots_histogram_max(struct bp_slots_histogram *hist, enum bp_type_idx type) in bp_slots_histogram_max() argument
252 const int count = atomic_read(&hist->count[i]); in bp_slots_histogram_max()
255 ASSERT_EXCLUSIVE_WRITER(hist->count[i]); in bp_slots_histogram_max()