diff mbox series

[2/3] libtracefs/Documentation: Clean up libtracefs-hist man pages

Message ID 20211123215958.1091307-3-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit b2b9d5dd8451e1bbd64cd6c7f11a3158af80eb30
Headers show
Series libtracefs: Update hist example | expand

Commit Message

Steven Rostedt Nov. 23, 2021, 9:59 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Include the tracefs_hist_key_type enum and the structure of
tracefs_hist_axis in the man page as that is expected to be useful. It
should not be expected that people must read the actual header for this
information.

Also add spaces between some of the functions to separate out
functionality a little to make it easier to read.

Also fix the missing "pass:" before "[*]axes".

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/libtracefs-hist.txt | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/libtracefs-hist.txt b/Documentation/libtracefs-hist.txt
index 31ea712..ab802cf 100644
--- a/Documentation/libtracefs-hist.txt
+++ b/Documentation/libtracefs-hist.txt
@@ -12,6 +12,23 @@  SYNOPSIS
 --
 *#include <tracefs.h>*
 
+enum tracefs_hist_key_type {
+	TRACEFS_HIST_KEY_NORMAL = 0,
+	TRACEFS_HIST_KEY_HEX,
+	TRACEFS_HIST_KEY_SYM,
+	TRACEFS_HIST_KEY_SYM_OFFSET,
+	TRACEFS_HIST_KEY_SYSCALL,
+	TRACEFS_HIST_KEY_EXECNAME,
+	TRACEFS_HIST_KEY_LOG,
+	TRACEFS_HIST_KEY_USECS,
+	TRACEFS_HIST_KEY_MAX
+};
+
+struct tracefs_hist_axis {
+	const char *key;
+	enum tracefs_hist_key_type type;
+};
+
 struct tracefs_hist pass:[*]tracefs_hist1d_alloc(struct tracefs_tep pass:[*] tep,
 			const char pass:[*]system, const char pass:[*]event,
 			const char pass:[*]key, enum tracefs_hist_key_type type);
@@ -21,27 +38,33 @@  struct tracefs_hist pass:[*]tracefs_hist2d_alloc(struct tracefs_tep pass:[*] tep
 			const char pass:[*]key2, enum tracefs_hist_key_type type2));
 struct tracefs_hist pass:[*]tracefs_hist_alloc(struct tracefs_tep pass:[*] tep,
 			const char pass:[*]system, const char pass:[*]event,
-			struct tracefs_hist_axis [*]axes);
+			struct tracefs_hist_axis 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_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);
+
 int tracefs_hist_set_sort_key(struct tracefs_hist pass:[*]hist,
 			      const char pass:[*]sort_key, ...);
 int tracefs_hist_sort_key_direction(struct tracefs_hist pass:[*]hist,
 				    const char pass:[*]sort_key,
 				    enum tracefs_hist_sort_direction dir);
+
 int tracefs_hist_add_name(struct tracefs_hist pass:[*]hist, const char pass:[*]name);
+
 int tracefs_hist_append_filter(struct tracefs_hist pass:[*]hist,
 			       enum tracefs_filter type,
 			       const char pass:[*]field,
 			       enum tracefs_compare compare,
 			       const char pass:[*]val);
+
 int tracefs_hist_echo_cmd(struct trace_seq pass:[*]s, struct tracefs_instance pass:[*]instance,
 			  struct tracefs_hist pass:[*]hist,
 			  enum tracefs_hist_command command);
+
 int tracefs_hist_command(struct tracefs_instance pass:[*]instance,
 			 struct tracefs_hist pass:[*]hist,
 			 enum tracefs_hist_command command);