linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v4 23/46] tools/lib/traceevent: Man pages tep_get_any_field_val(), tep_get_common_field_val(), tep_get_field_val() and tep_get_field_raw()
Date: Wed, 13 Mar 2019 14:36:47 -0400	[thread overview]
Message-ID: <20190313143647.7dac33e2@gandalf.local.home> (raw)
In-Reply-To: <20190308133654.21264-24-tstoyanov@vmware.com>

On Fri,  8 Mar 2019 15:36:31 +0200
Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:

> Create man pages for tep_get_any_field_val(), tep_get_common_field_val(),
> tep_get_field_val() and tep_get_field_raw() as part of the libtraceevent APIs.
> 
> Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
> ---
>  .../libtraceevent-field_get_val.txt           | 117 ++++++++++++++++++
>  1 file changed, 117 insertions(+)
>  create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-field_get_val.txt
> 
> diff --git a/tools/lib/traceevent/Documentation/libtraceevent-field_get_val.txt b/tools/lib/traceevent/Documentation/libtraceevent-field_get_val.txt
> new file mode 100644
> index 000000000000..dbb4875c49fb
> --- /dev/null
> +++ b/tools/lib/traceevent/Documentation/libtraceevent-field_get_val.txt
> @@ -0,0 +1,117 @@
> +libtraceevent(3)
> +================
> +
> +NAME
> +----
> +tep_get_any_field_val,tep_get_common_field_val,tep_get_field_val,tep_get_field_raw - Get value of a field.
> +
> +SYNOPSIS
> +--------
> +[verse]
> +--
> +*#include <event-parse.h>*
> +*#include <trace-seq.h>*
> +
> +int *tep_get_any_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_);
> +int *tep_get_common_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_);
> +int *tep_get_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_);
> +void pass:[*]*tep_get_field_raw*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, int pass:[*]_len_, int _err_);
> +--
> +
> +DESCRIPTION
> +-----------
> +These functions can be used to find a field and retrieve its value.
> +
> +The _tep_get_any_field_val()_ function searches in the _record_ for a filed with

s/filed/field/

> +_name_, part of the _event_. If the field is found, its value is stored in _val_.
> +In case of an error, an error string is printed into _s_, if _err_ is not 0.

The above is worded in a confusing way. May want to make it:

 "If there is an error and _err_ is not zero, then an error string is
  written into _s_."


> +
> +The _tep_get_common_field_val()_ function does the same as
> +_tep_get_any_field_val()_, but searches only in the common fields.

Add "This will work for any event as all events include the common
fields".

> +
> +The _tep_get_field_val()_ function does the same as
> +_tep_get_any_field_val()_, but searches only in the event specific fields.
> +
> +The _tep_get_field_raw()_ function searches in the _record_ for a filed with _name_,

 /filed/field/

> +part of the _event_. If the field is found, a pointer to its raw data is returned.
> +The size of the data is stored in _len_. In case of an error, an error string
> +is printed into _s_, if _err_ is not 0.

Change that last sentence too.

-- Steve

> +
> +RETURN VALUE
> +------------
> +The _tep_get_any_field_val()_, _tep_get_common_field_val()_ and
> +_tep_get_field_val()_ functions return 0 on success, or -1 in case of an error.
> +
> +The _tep_get_field_raw()_ function returns a pointer to field's raw data, and
> +places the length of this data in _len_. In case of an error NULL is returned.
> +

  reply	other threads:[~2019-03-13 18:36 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 13:36 [PATCH v4 00/46] Libtraceevent MAN pages Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 01/46] tools/lib/traceevent: Implement libtraceevent man pages Tzvetomir Stoyanov
2019-03-18 21:04   ` [Suspected Spam] " Matt Helsley
2019-03-19 11:28     ` Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 02/46] tools/lib/traceevent: Fix libtraceevent/Documentation Makefile Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 03/46] tools/lib/traceevent: Add support for man pages with multiple names Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 04/46] tools/lib/traceevent: libtraceevent Makefile "help" target Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 05/46] tools/lib/traceevent: libtraceevent man pages for tep_handler related APIs Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 06/46] tools/lib/traceevent: Man page for tep_get_header_page_size() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 07/46] tools/lib/traceevent: Man page for tep_get_cpus() and tep_set_cpus() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 08/46] tools/lib/traceevent: Man page for tep_is_file_bigendian() and tep_set_file_bigendian() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 09/46] tools/lib/traceevent: Man page for tep_is_host_bigendian() and tep_set_host_bigendian() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 10/46] tools/lib/traceevent: Man page for tep_is_latency_format() and tep_set_latency_format() Tzvetomir Stoyanov
2019-03-13 16:28   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 11/46] tools/lib/traceevent: Man page for tep_get_page_size() and tep_set_page_size() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 12/46] tools/lib/traceevent: Man page for tep_strerror() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 13/46] tools/lib/traceevent: Man page for tep_register_trace_clock() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 14/46] tools/lib/traceevent: Man pages for tep_register_event_handler() and tep_unregister_event_handler() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 15/46] tools/lib/traceevent: Man pages for tep_register_function() and tep_register_print_string() Tzvetomir Stoyanov
2019-03-13 16:57   ` Steven Rostedt
2019-03-13 16:59   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 16/46] tools/lib/traceevent: Man pages for tep_register_print_function() and tep_unregister_print_function() Tzvetomir Stoyanov
2019-03-13 17:23   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 17/46] tools/lib/traceevent: Man page for tep_read_number() Tzvetomir Stoyanov
2019-03-13 17:26   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 18/46] tools/lib/traceevent: Man pages for tep_find_event(), tep_find_event_by_name() and tep_find_event_by_record() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 19/46] tools/lib/traceevent: Man page for tep_list_events() Tzvetomir Stoyanov
2019-03-13 17:29   ` Steven Rostedt
2019-03-14 13:05     ` Tzvetomir Stoyanov
2019-03-14 13:39       ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 20/46] 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
2019-03-13 17:33   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 21/46] tools/lib/traceevent: Man pages tep_get_first_event() and tep_get_events_count() Tzvetomir Stoyanov
2019-03-13 17:35   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 22/46] tools/lib/traceevent: Man pages tep_find_common_field(), tep_find_field() and tep_find_any_field() Tzvetomir Stoyanov
2019-03-13 17:42   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 23/46] 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
2019-03-13 18:36   ` Steven Rostedt [this message]
2019-03-08 13:36 ` [PATCH v4 24/46] tools/lib/traceevent: Man pages for tep_print_field(), tep_print_fields(), tep_print_num_field() and tep_print_func_field() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 25/46] tools/lib/traceevent: Man page for tep_read_number_field() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 26/46] tools/lib/traceevent: Man pages for tep_event_common_fields() and tep_event_fields() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 27/46] tools/lib/traceevent: Man pages for tep_filter_alloc(), tep_filter_free() and tep_filter_reset() Tzvetomir Stoyanov
2019-03-13 19:11   ` Steven Rostedt
2019-03-13 19:13     ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 28/46] tools/lib/traceevent: Man page for tep_filter_add_filter_str() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 29/46] tools/lib/traceevent: Man page for tep_filter_strerror() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 30/46] tools/lib/traceevent: Man pages for tep_event_filtered() and tep_filter_remove_event() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 31/46] tools/lib/traceevent: Man page for tep_filter_match() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 32/46] tools/lib/traceevent: Man pages for tep_filter_copy() and tep_filter_compare() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 33/46] tools/lib/traceevent: Man page for tep_filter_make_string() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 34/46] tools/lib/traceevent: Man pages for tep_filter_event_has_trivial(), tep_update_trivial() and tep_filter_clear_trivial() Tzvetomir Stoyanov
2019-03-13 20:04   ` Steven Rostedt
2019-03-15 12:26     ` Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 35/46] tools/lib/traceevent: Man pages for tep_find_function() and tep_find_function_address() Tzvetomir Stoyanov
2019-03-13 20:05   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 36/46] tools/lib/traceevent: Man pages for tep_set_function_resolver() and tep_reset_function_resolver() Tzvetomir Stoyanov
2019-03-13 20:06   ` Steven Rostedt
2019-03-19 19:08     ` Matt Helsley
2019-03-08 13:36 ` [PATCH v4 37/46] tools/lib/traceevent: Man pages for tep_parse_event() and tep_parse_format() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 38/46] tools/lib/traceevent: Man page for tep_parse_header_page() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 39/46] tools/lib/traceevent: Man pages for tep_load_plugins() and tep_unload_plugin() Tzvetomir Stoyanov
2019-03-13 20:27   ` Steven Rostedt
2019-03-13 21:42     ` Patrick McLean
2019-03-13 21:45       ` Patrick McLean
2019-03-14  0:53         ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 40/46] tools/lib/traceevent: Man page for tep_data_lat_fmt() Tzvetomir Stoyanov
2019-03-13 20:32   ` Steven Rostedt
2019-03-19 19:32   ` [Suspected Spam] " Matt Helsley
2019-03-08 13:36 ` [PATCH v4 41/46] tools/lib/traceevent: Man pages for tep_data_type(), tep_data_pid(), tep_data_preempt_count() and tep_data_flags() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 42/46] tools/lib/traceevent: Man pages for trace_seq_init() and trace_seq_destroy() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 43/46] tools/lib/traceevent: Man pages for trace_seq_do_fprintf() and trace_seq_do_printf() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 44/46] tools/lib/traceevent: Man pages for trace_seq_printf() and trace_seq_vprintf() Tzvetomir Stoyanov
2019-03-08 13:36 ` [PATCH v4 45/46] tools/lib/traceevent: Man pages for trace_seq_putc() and trace_seq_puts() Tzvetomir Stoyanov
2019-03-14  2:58   ` Steven Rostedt
2019-03-08 13:36 ` [PATCH v4 46/46] tools/lib/traceevent: Man pages for trace_seq_reset() and trace_seq_terminate() Tzvetomir Stoyanov
2019-03-08 14:19 ` [PATCH v4 00/46] Libtraceevent MAN pages Claudio
2019-03-08 15:47   ` Tzvetomir Stoyanov
2019-03-08 18:52     ` Claudio
2019-03-12 15:35     ` Steven Rostedt
2019-03-13 11:24       ` Claudio

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=20190313143647.7dac33e2@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=tstoyanov@vmware.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).