llquantize
() Function
The llquantize
() action stores unsigned 64-bit values in buckets similar to the lquantize
() action. Because llquantize
() presents a log-linear quantization, the arguments to llquantize
() are different from those for lquantize
(). The arguments to the llquantize
() action are:
-
Value of interest
-
A factor – The base of the logarithm
-
Lower magnitude of the log-linear quantization, which is the first set of buckets that cover the values n * factor ^ lower magnitude
-
Upper magnitude of the log-linear quantization, which is the last set of buckets that cover the values n * factor ^ upper magnitude
-
Step value – Each magnitude contains this number of buckets
The first 64-bit word in the data encodes the factor, low magnitude, high magnitude, and steps. Each is encoded as an unsigned 16-bit integer. You can extract these values of encoded data by using the following macros:
-
DTRACE_LLQUANTIZE_FACTOR(x)
-
DTRACE_LLQUANTIZE_LMAG(x)
-
DTRACE_LLQUANTIZE_HMAG(x)
-
DTRACE_LLQUANTIZE_STEPS(x)
The remaining values in the data are:
-
The underflow bucket
-
Sets of buckets for each magnitude
-
Overflow data
The factor and the value of the steps determines the number of buckets at each level. If the magnitude is zero, there are only factor-1 buckets. If the magnitude is other zero, there are steps - steps/factor buckets per magnitude.
For example, if factor == 10 and steps == 20, there are 20 - 20/10 == 18 buckets per magnitude. However, if the magnitude is 0, there are 10 - 1 == 9 buckets: 1x10^0 through 9x10^0.
llquantize() (dtrd_action == DTRACEAGG_LLQUANTIZE)
Data Format for the llquantize
() Action