libtracefs: Update documentation for tracefs_hist_alloc_nd_cnt()
PATCH 1/1 libtracefs: Update documentation for tracefs_hist_alloc_nd_cnt()
From d3dc041127eca2155169f304235667f18d6266aa Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Google)" <[email protected]>
Date: Wed, 28 Sep 2022 12:09:39 -0400
Subject: [PATCH] libtracefs: Update documentation for
tracefs_hist_alloc_nd_cnt()
As tracefs_hist_alloc_nd_cnt() was added too, add it to the documentation man pages, and also update the main libtracefs man page to include both:
tracefs_hist_add_key_cnt()
tracefs_hist_alloc_nd_cnt()
Fixes faa0ba7f ("libtracefs: Add buckets field to tracefs_sql() function")
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- Documentation/libtracefs-hist.txt | 11 ++++++++++- Documentation/libtracefs.txt | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-)
Documentation/libtracefs-hist.txt +10 -1
@@ -3,7 +3,7 @@ libtracefs(3) NAME ---- -tracefs_hist_alloc, tracefs_hist_alloc_2d, tracefs_hist_alloc_nd, tracefs_hist_free, +tracefs_hist_alloc, tracefs_hist_alloc_2d, tracefs_hist_alloc_nd, tracefs_hist_alloc_nd_cnt, tracefs_hist_free, tracefs_hist_add_key, tracefs_hist_add_key_cnt, tracefs_hist_add_value - Create and destroy event histograms SYNOPSIS
@@ -39,6 +39,9 @@ struct tracefs_hist pass:[*]*tracefs_hist_alloc_2d*(struct tracefs_tep pass:[*] struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd*(struct tracefs_tep pass:[*] _tep_, const char pass:[*]_system_, const char pass:[*]_event_, struct tracefs_hist_axis pass:[*]_axes_); +struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd_cnt*(struct tep_handle pass:[*]_tep_, + const char pass:[*]_system_, const char pass:[*]_event_name_, + struct tracefs_hist_axis_cnt pass:[*]_axes_); void *tracefs_hist_free*(struct tracefs_hist pass:[*]_hist_); int *tracefs_hist_add_key*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_key_,
@@ -80,6 +83,12 @@ _system_ and _event_ that the histogram will be attached to. The _system_ is the system or group of the event. The _event_ is the event to attach the histogram to. The _axes_ is an array of _key_ / _type_ pairs, defining the dimensions of the histogram. +*tracefs_hist_alloc_nd_cnt*() will initialize a histogram descriptor that will be attached to +the _system_/_event_. This only initializes the descriptor with the given _axes_ keys as primaries. +This only initializes the descriptor, it does not start the histogram in the kernel. +The difference between this and *tracefs_hist_alloc_nd()* is that the _axes_ parameter +is of type *struct tracefs_hist_axis_cnt* and not *struct tracefs_hist_axis*. + *tracefs_hist_free*() frees the _tracefs_hist_ descriptor. Note, it does not stop or disable the running histogram if it was started. *tracefs_hist_destroy*() needs to be called to do so.
Documentation/libtracefs.txt +5 -0
@@ -230,9 +230,14 @@ Histograms: struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd*(struct tracefs_tep pass:[*] _tep_, const char pass:[*]_system_, const char pass:[*]_event_, struct tracefs_hist_axis pass:[*]_axes_); + struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd_cnt*(struct tep_handle pass:[*]_tep_, + const char pass:[*]_system_, const char pass:[*]_event_name_, + struct tracefs_hist_axis_cnt pass:[*]_axes_); void *tracefs_hist_free*(struct tracefs_hist pass:[*]_hist_); int *tracefs_hist_add_key*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_key_, enum tracefs_hist_key_type _type_); + int *tracefs_hist_add_key_cnt*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_key_, + enum tracefs_hist_key_type _type_, int _cnt_); int *tracefs_hist_add_value*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_value_); int *tracefs_hist_add_sort_key*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_sort_key_);
Signature · 1 line
2.35.1