All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH 5/7] tools/lib/traceevent: Implement libtraceevent man pages
Date: Tue, 6 Nov 2018 19:19:58 -0500	[thread overview]
Message-ID: <20181106191958.2c07ec17@gandalf.local.home> (raw)
In-Reply-To: <20181106132035.7692-6-tstoyanov@vmware.com>

On Tue, 6 Nov 2018 13:20:54 +0000
Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:

> This patch implements a man page, which documents
> tep_is_latency_format() and tep_set_latency_format()
> libtraceevent APIs
> 
> Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
> ---
>  .../libtraceevent-latency_format.txt          | 98 +++++++++++++++++++
>  1 file changed, 98 insertions(+)
>  create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-latency_format.txt
> 
> diff --git a/tools/lib/traceevent/Documentation/libtraceevent-latency_format.txt b/tools/lib/traceevent/Documentation/libtraceevent-latency_format.txt
> new file mode 100644
> index 000000000000..a7eaed5d1a7e
> --- /dev/null
> +++ b/tools/lib/traceevent/Documentation/libtraceevent-latency_format.txt
> @@ -0,0 +1,98 @@
> +libtraceevent(3)
> +================
> +
> +NAME
> +----
> +tep_set_latency_format,tep_is_latency_format - Get / set "latency output" format.
> +
> +SYNOPSIS
> +--------
> +[verse]
> +--
> +*#include <event-parse.h>*
> +
> +void *tep_set_latency_format*(struct tep_handle pass:[*]_tep_, int _lat_);
> +int *tep_is_latency_format*(struct tep_handle pass:[*]_tep_);
> +
> +--
> +
> +DESCRIPTION
> +-----------
> +"Latency output" format prints information about interrupts being disabled, 
> +soft irq being disabled, the "need_resched" flag being set, preempt count, 
> +and big kernel lock. This information is recorded with every event, but by 

The "big kernel lock" no longer exists (Yay!!!), we can remove that
line.

> +default is not printed.
> +
> +The _tep_set_latency_format()_ function enables the "latency output" printing.
> +The _tep_ argument is trace event parser context. The _lat_ argument can be zero,
> +for "latency output" disabled, or non zero for "latency output" enabled.

Hmm, perhaps we should change that parameter to true or false.

> +Information is displayed with 6 characters. When a field is zero, or N/A, a pass:['.'] 
> +is printed. Example:
> +[verse]
> +--
> +  <idle>-0       0d.h1. 106467.859747: function:             ktime_get <-- tick_check_idle
> +--
> +The 0d.h1. denotes this information. The first character is never a pass:['.']
> +and represents what CPU the trace was recorded on (CPU 0). The pass:['d'] denotes
> +that interrupts were disabled. The pass:['h'] means that this was called inside
> +an interrupt handler. The pass:['1'] is the preemption disabled (preempt_count)
> +was set to one.  The two pass:['.']s are "need_resched" flag and kernel lock
> +counter. If the "need_resched" flag is set, then that character would be a pass:['N'].
> +
> +The _tep_is_latency_format()_ function returns if "latency output" is enabled.

We need to add somewhere in this description about
tep_print_event_task() and tep_print_event_time() which is what this
affects. As tep_print_event*() creates the string to output and is
affected by this format.

We may change this before we release the final output.

-- Steve

> +
> +RETURN VALUE
> +------------
> +
> +The _tep_is_latency_format()_ function returns non zero if "latency output" 
> +is enabled, or zero if it is disabled.
> +
> +EXAMPLE
> +-------
> +[source,c]
> +--
> +#include <event-parse.h>
> +...
> +struct tep_handle *tep = tep_alloc();
> +...
> +	tep_set_latency_format(tep, 1);
> +...
> +	if (tep_is_latency_format(tep)) {
> +		/* latency output format is enabled */
> +	} else {
> +		/* latency output format is disabled */
> +	}
> +--
> +
> +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

  reply	other threads:[~2018-11-07  9:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 13:20 [PATCH 0/7] libtracevent man pages Tzvetomir Stoyanov
2018-11-06 13:20 ` [PATCH 1/7] tools/lib/traceevent: Implement libtraceevent " Tzvetomir Stoyanov
2018-11-06 13:20 ` [PATCH 2/7] " Tzvetomir Stoyanov
2018-11-07  0:07   ` Steven Rostedt
2018-11-06 13:20 ` [PATCH 3/7] " Tzvetomir Stoyanov
2018-11-07  0:14   ` Steven Rostedt
2018-11-06 13:20 ` [PATCH 4/7] " Tzvetomir Stoyanov
2018-11-07  0:15   ` Steven Rostedt
2018-11-07 14:45     ` Tzvetomir Stoyanov
2018-11-06 13:20 ` [PATCH 5/7] " Tzvetomir Stoyanov
2018-11-07  0:19   ` Steven Rostedt [this message]
2018-11-06 13:20 ` [PATCH 6/7] " Tzvetomir Stoyanov
2018-11-07  0:23   ` Steven Rostedt
2018-11-06 13:20 ` [PATCH 7/7] " 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=20181106191958.2c07ec17@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 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.