kstat2_hist_add_value - create and initialize a new kstat whose data represents a histogram
#include <sys/types.h> #include <sys/kstat2.h> void kstat2_hist_add_value(kstat2_t *ksp2, uint64_t value);
Solaris DDI specific (Solaris DDI)
A kstat created by kstat2_create_histogram() function. For more information, see kstat2_create_histogram(9F)
The value to be added to the histogram.
kstat2_hist_add_value() function is used to add data to a histogram kstat.
The function first determines the bucket into which the supplied value will go. If the bucket already exists, its value is incremented by 1. If the bucket does not exist it is created along with any earlier buckets required from the histogram's range_min.
No value is returned.
The kstat2_hist_add_value() function can be called from user or kernel context.
In order to minimize latency, the kstat2_hist_add_value() function does not attempt to obtain the lock of the passed-in kstat. If kstat is deleted by another thread while a thread is in kstat2_hist_add_value() function, the caller must lock the kstat using the kstat2_hold_bykid() function prior to calling the kstat2_hist_add_value() function, and release it with the kstat2_rele() function later.