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] tools/lib/traceevent: Rename tep_is_file_bigendian() to tep_file_bigendian()
Date: Fri, 9 Nov 2018 15:36:29 +0000	[thread overview]
Message-ID: <20181109153618.11961-1-tstoyanov@vmware.com> (raw)

In order to make libtraceevent into a proper library, its API
should be straightforward. After discussion with Steven Rostedt,
we decided to rename few APIs, to have more intuitive names.
This patch renames tep_is_file_bigendian() to tep_file_bigendian().

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 .../Documentation/libtraceevent-file_endian.txt        | 10 +++++-----
 tools/lib/traceevent/Documentation/libtraceevent.txt   |  2 +-
 tools/lib/traceevent/event-parse-api.c                 |  4 ++--
 tools/lib/traceevent/event-parse.h                     |  2 +-
 tools/lib/traceevent/plugin_kvm.c                      |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/lib/traceevent/Documentation/libtraceevent-file_endian.txt b/tools/lib/traceevent/Documentation/libtraceevent-file_endian.txt
index 5b8e01235eda..2b763aaf9c6b 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent-file_endian.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent-file_endian.txt
@@ -3,7 +3,7 @@ libtraceevent(3)
 
 NAME
 ----
-tep_is_file_bigendian,tep_set_file_bigendian - Get / set the endianess of the 
+tep_file_bigendian,tep_set_file_bigendian - Get / set the endianess of the 
 raw data, being accessed by the tep handler. 
 
 SYNOPSIS
@@ -17,13 +17,13 @@ enum *tep_endian* {
 	TEP_BIG_ENDIAN
 };
 
-int *tep_is_file_bigendian*(struct tep_handle pass:[*]_tep_);
+int *tep_file_bigendian*(struct tep_handle pass:[*]_tep_);
 void *tep_set_file_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_);
 
 --
 DESCRIPTION
 -----------
-The _tep_is_file_bigendian()_ function returns the endianess of the raw data,
+The _tep_file_bigendian()_ function returns the endianess of the raw data,
 being accessed by the tep handler. The _tep_ argument is trace event parser context.
 
 The _tep_set_file_bigendian()_ set the endianess of raw data, the being accessed 
@@ -36,7 +36,7 @@ The _endian_ argument is the endianess:
 --
 RETURN VALUE
 ------------
-The _tep_is_file_bigendian()_ function returns _TEP_LITTLE_ENDIAN_ or _TEP_BIG_ENDIAN_.
+The _tep_file_bigendian()_ function returns _TEP_LITTLE_ENDIAN_ or _TEP_BIG_ENDIAN_.
 
 EXAMPLE
 -------
@@ -48,7 +48,7 @@ struct tep_handle *tep = tep_alloc();
 ...
 	tep_set_file_bigendian(tep, TEP_LITTLE_ENDIAN);
 ...
-	if (TEP_BIG_ENDIAN == tep_is_file_bigendian(tep)) {
+	if (TEP_BIG_ENDIAN == tep_file_bigendian(tep)) {
 		/* The raw data is in big endian */
 	} else {
 		/* The raw data is in little endian */
diff --git a/tools/lib/traceevent/Documentation/libtraceevent.txt b/tools/lib/traceevent/Documentation/libtraceevent.txt
index e2b4ca615809..1100240a8a29 100644
--- a/tools/lib/traceevent/Documentation/libtraceevent.txt
+++ b/tools/lib/traceevent/Documentation/libtraceevent.txt
@@ -129,7 +129,7 @@ Command and task related APIs:
 Endian related APIs:
 	int *tep_host_bigendian*(void);
 	unsigned long long *tep_read_number*(struct tep_handle pass:[*]_tep_, const void pass:[*]_ptr_, int _size_);
-	int *tep_is_file_bigendian*(struct tep_handle pass:[*]_tep_);
+	int *tep_file_bigendian*(struct tep_handle pass:[*]_tep_);
 	void *tep_set_file_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_);
 	int *tep_is_host_bigendian*(struct tep_handle pass:[*]_tep_);
 	void *tep_set_host_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_);
diff --git a/tools/lib/traceevent/event-parse-api.c b/tools/lib/traceevent/event-parse-api.c
index 39e0fca2d9a2..884b8585d22e 100644
--- a/tools/lib/traceevent/event-parse-api.c
+++ b/tools/lib/traceevent/event-parse-api.c
@@ -201,13 +201,13 @@ void tep_set_page_size(struct tep_handle *pevent, int _page_size)
 }
 
 /**
- * tep_is_file_bigendian - get if the file is in big endian order
+ * tep_file_bigendian - get if the file is in big endian order
  * @pevent: a handle to the tep_handle
  *
  * This returns if the file is in big endian order
  * If @pevent is NULL, 0 is returned.
  */
-int tep_is_file_bigendian(struct tep_handle *pevent)
+int tep_file_bigendian(struct tep_handle *pevent)
 {
 	if (pevent)
 		return pevent->file_bigendian;
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index ff74dc392268..262abe3c6c9e 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -553,7 +553,7 @@ int tep_get_long_size(struct tep_handle *pevent);
 void tep_set_long_size(struct tep_handle *pevent, int long_size);
 int tep_get_page_size(struct tep_handle *pevent);
 void tep_set_page_size(struct tep_handle *pevent, int _page_size);
-int tep_is_file_bigendian(struct tep_handle *pevent);
+int tep_file_bigendian(struct tep_handle *pevent);
 void tep_set_file_bigendian(struct tep_handle *pevent, enum tep_endian endian);
 int tep_is_host_bigendian(struct tep_handle *pevent);
 void tep_set_host_bigendian(struct tep_handle *pevent, enum tep_endian endian);
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index 637be7c18476..388a78a6035f 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -389,7 +389,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record,
 	 * We can only use the structure if file is of the same
 	 * endianess.
 	 */
-	if (tep_is_file_bigendian(event->pevent) ==
+	if (tep_file_bigendian(event->pevent) ==
 	    tep_is_host_bigendian(event->pevent)) {
 
 		trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s",
-- 
2.17.2

                 reply	other threads:[~2018-11-10  1:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20181109153618.11961-1-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.