Re: [PATCH V7 05/14] rtla/osnoise: Add the hist mode

From
Daniel Bristot de Oliveira <bristot@kernel.org>
Date
2021-11-25 14:10:48
Also in
lkml
Reply to
Steven Rostedt, 2021-11-24
On 11/24/21 23:15, Steven Rostedt wrote:
quoted
quoted
+	/*
+	 * Set the size of the bucket.
+	 */
+	bucket_size = params->output_divisor * params->bucket_size;
+	snprintf(buff, sizeof(buff), "duration.buckets=%d", bucket_size);
+
+	data->trace_hist = tracefs_hist_alloc(tool->trace.tep, "osnoise", "sample_threshold",
+			buff, TRACEFS_HIST_KEY_NORMAL);  
FYI, we changed the API (haven't tagged it yet, so we can do that :-) and
the above needs to be:

	data->trace_hist = tracefs_hist1d_alloc(tool->trace.tep, "osnoise", "sample_threshold",
Or do you think that 1d should be the default, and we have:

	tracefs_hist_alloc()	-- 1d histogram
	tracefs_hist_alloc_2d()	-- 2d histogram
	tracefs_hist_alloc_nd()	-- Nd histogram?

??
IMHO, the function names in your second email sound more intuitive, i.e.,
tracefs_hist_alloc()/tracefs_hist_alloc_2d()/tracefs_hist_alloc_nd().
We haven't tagged it yet, so we could change it again (and then your code
will work as is).
two birds with a single stone :-)

-- Daniel
-- Steve
  
Thread (26 messages) 26 messages, 2 authors, last reply 2021-11-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help