Re: [PATCH v2] tracing: Add linear buckets to histogram logic

From: Steven Rostedt
Date: Tue Jul 06 2021 - 20:35:51 EST


On Tue, 06 Jul 2021 17:09:24 -0500
Tom Zanussi <zanussi@xxxxxxxxxx> wrote:

> > +++ b/kernel/trace/trace_events_hist.c
> > @@ -120,6 +120,7 @@ struct hist_field {
> > unsigned int size;
> > unsigned int offset;
> > unsigned int is_signed;
> > + unsigned long grouping;
>
> Just wondering if it would be more consistent to name this 'buckets' or
> even 'bucket_size'.

I originally did change it to that, but thought against it. I guess I
could change that.

Thanks!

-- Steve


>
> > const char *type;
> > struct hist_field *operands[HIST_FIELD_OPERANDS_MAX];
> > struct hist_trigger_data *hist_data;
> > @@ -218,6 +219,27 @@ static u64 hist_field_log2(struct hist_field
> > *hist_field,
> > return (u64) ilog2(roundup_pow_of_two(val));
> > }
> >