All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tstoyanov@vmware.com>
To: "rostedt@goodmis.org" <rostedt@goodmis.org>
Cc: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: [PATCH 10/34] tools/lib/traceevent: Man pages tep_find_common_field(), tep_find_field() and tep_find_any_field()
Date: Mon, 19 Nov 2018 12:54:20 +0000	[thread overview]
Message-ID: <20181119125357.19449-11-tstoyanov@vmware.com> (raw)
In-Reply-To: <20181119125357.19449-1-tstoyanov@vmware.com>

Create man pages for tep_find_common_field(), tep_find_field()
and tep_find_any_field() as part of the libtraceevent APIs.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 .../libtraceevent-field_find.txt              | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-field_find.txt

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-field_find.txt b/tools/lib/traceevent/Documentation/libtraceevent-field_find.txt
new file mode 100644
index 000000000000..a5afe260285a
--- /dev/null
+++ b/tools/lib/traceevent/Documentation/libtraceevent-field_find.txt
@@ -0,0 +1,98 @@
+libtraceevent(3)
+================
+
+NAME
+----
+tep_find_common_field,tep_find_field,tep_find_any_field - Search for a field in an event. 
+
+SYNOPSIS
+--------
+[verse]
+--
+*#include <event-parse.h>*
+
+struct tep_format_field pass:[*]*tep_find_common_field*(struct tep_event pass:[*]_event_, const char pass:[*]_name_);
+struct tep_format_field pass:[*]*tep_find_field*(struct tep_event_ormat pass:[*]_event_, const char pass:[*]_name_);
+struct tep_format_field pass:[*]*tep_find_any_field*(struct tep_event pass:[*]_event_, const char pass:[*]_name_);
+--
+
+DESCRIPTION
+-----------
+These functions search for a field with given name in an event.
+
+The _tep_find_common_field()_ function searches for a common field with _name_ 
+in the _event_.
+
+The _tep_find_field()_ function searches for an event specific field with
+_name_ in the _event_.
+
+The _tep_find_any_field()_ function searches for any field with _name_ in the 
+_event_.
+
+RETURN VALUE
+------------
+The _tep_find_common_field(), _tep_find_field()_ and _tep_find_any_field()_
+functions return a pointer to the found field, or NULL in case there is no field
+with the requested name.
+
+EXAMPLE
+-------
+[source,c]
+--
+#include <event-parse.h>
+...
+struct tep_handle *tep = tep_alloc();
+...
+struct tep_event *event = tep_find_event_by_name(tep, "timer", "hrtimer_start");
+...
+	struct tep_format_field *field;
+
+	field = tep_find_common_field(event, "common_pid");
+	if (field == NULL) {
+		/* Cannot find "common_pid" common field in the event */
+	}
+
+	field = tep_find_field(event, "softexpires");
+	if (field == NULL) {
+		/* Cannot find "softexpires" event specific field in the event */
+	}
+	
+	field = tep_find_any_field(event, "mode");
+	if (field == NULL) {
+		/* Cannot find "mode" field in the event */
+	}
+...
+--
+
+FILES
+-----
+[verse]
+--
+*event-parse.h*
+	Header file to include in order to have access to the library APIs.
+*-ltraceevent*
+	Linker switch to add when building a program that uses the library.
+--
+
+SEE ALSO
+--------
+_libtraceevent(3)_, _trace-cmd(1)_
+
+AUTHOR
+------
+[verse]
+--
+*Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*.
+*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
+--
+REPORTING BUGS
+--------------
+Report bugs to  <linux-trace-devel@vger.kernel.org>
+
+LICENSE
+-------
+libtraceevent is Free Software licensed under the GNU LGPL 2.1
+
+RESOURCES
+---------
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
-- 
2.19.1

  parent reply	other threads:[~2018-11-19 23:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 12:54 [PATCH 00/34] A lot of libtraceevent man pages Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 01/34] tools/lib/traceevent: Man page for tep_register_trace_clock() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 02/34] tools/lib/traceevent: Man pages for tep_register_event_handler() and tep_unregister_event_handler() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 03/34] tools/lib/traceevent: Man pages for tep_register_function() and tep_register_print_string() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 04/34] tools/lib/traceevent: Man pages for tep_register_print_function() and tep_unregister_print_function() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 05/34] tools/lib/traceevent: Man page for tep_read_number() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 06/34] tools/lib/traceevent: Man pages for tep_find_event(), tep_find_event_by_name() and tep_find_event_by_record() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 07/34] tools/lib/traceevent: Man page for tep_list_events() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 08/34] tools/lib/traceevent: Man pages for tep_print_event(), tep_print_event_data(), tep_event_info(), tep_print_event_task() and tep_print_event_time() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 09/34] tools/lib/traceevent: Man pages tep_get_first_event() and tep_get_events_count() Tzvetomir Stoyanov
2018-11-19 12:54 ` Tzvetomir Stoyanov [this message]
2018-11-19 12:54 ` [PATCH 11/34] tools/lib/traceevent: Man pages tep_get_any_field_val(), tep_get_common_field_val(), tep_get_field_val() and tep_get_field_raw() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 12/34] tools/lib/traceevent: Man pages for tep_print_field(), tep_print_fields(), tep_print_num_field() and tep_print_func_field() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 13/34] tools/lib/traceevent: Man page for tep_read_number_field() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 14/34] tools/lib/traceevent: Man pages for tep_event_common_fields() and tep_event_fields() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 15/34] tools/lib/traceevent: Man pages for tep_filter_alloc(), tep_filter_free() and tep_filter_reset() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 16/34] tools/lib/traceevent: Man page for tep_filter_add_filter_str() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 17/34] tools/lib/traceevent: Man page for tep_filter_strerror() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 18/34] tools/lib/traceevent: Man pages for tep_event_filtered() and tep_filter_remove_event() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 19/34] tools/lib/traceevent: Man page for tep_filter_match() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 20/34] tools/lib/traceevent: Man pages for tep_filter_copy() and tep_filter_compare() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 21/34] tools/lib/traceevent: Man page for tep_filter_make_string() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 22/34] tools/lib/traceevent: Man pages for tep_filter_event_has_trivial(), tep_update_trivial() and tep_filter_clear_trivial() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 23/34] tools/lib/traceevent: Man pages for tep_find_function() and tep_find_function_address() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 24/34] tools/lib/traceevent: Man pages for tep_set_function_resolver() and tep_reset_function_resolver() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 25/34] tools/lib/traceevent: Man pages for tep_parse_event() and tep_parse_format() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 26/34] tools/lib/traceevent: Man page for tep_parse_header_page() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 27/34] tools/lib/traceevent: Man pages for tep_load_plugins() and tep_unload_plugin() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 28/34] tools/lib/traceevent: Man page for tep_data_lat_fmt() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 29/34] tools/lib/traceevent: Man pages for tep_data_type(), tep_data_pid(), tep_data_preempt_count() and tep_data_flags() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 30/34] tools/lib/traceevent: Man pages for trace_seq_init() and trace_seq_destroy() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 31/34] tools/lib/traceevent: Man pages for trace_seq_do_fprintf() and trace_seq_do_printf() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 32/34] tools/lib/traceevent: Man pages for trace_seq_printf() and trace_seq_vprintf() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 33/34] tools/lib/traceevent: Man pages for trace_seq_putc() and trace_seq_puts() Tzvetomir Stoyanov
2018-11-19 12:54 ` [PATCH 34/34] tools/lib/traceevent: Man pages for trace_seq_reset() and trace_seq_terminate() Tzvetomir Stoyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181119125357.19449-11-tstoyanov@vmware.com \
    --to=tstoyanov@vmware.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.