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