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>,
	Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: tep_*host_bigendian()
Date: Thu, 8 Nov 2018 13:30:53 -0500	[thread overview]
Message-ID: <20181108133053.6eb22596@gandalf.local.home> (raw)

Hi Tzvetomir,

I was looking at the code for tep_is_file_bigendian(),
tep_is_host_bigendian() and tep_host_bigendian().

The tep_host_bigendian() checks if the current machine that is
executing is bigendian or not.

tep_is_host_bigendian() looks at the pevent to see what it has, which
should be the same as tep_host_bigendian().

tep_is_file_bigendian() is if the raw file format is bigendian or not.
If the file does not mach the host, byte swapping needs to be made.

Looking at this deeper, I think the names are backwards.

Let's rename tep_host_bigendian() to tep_is_host_bigendian()
      rename tep_is_host_bigendian() to tep_host_bigendian()
      rename tep_is_file_bigendian() to tep_file_bigendian()


The "is_host" to me sounds more like we are testing the actual host,
where as just saying 'tep_host_bigendian' sounds to me that it's what
the pevent has the host set as.

-- Steve

             reply	other threads:[~2018-11-09  4:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 18:30 Steven Rostedt [this message]
2018-11-08 19:40 ` tep_*host_bigendian() Tzvetomir Stoyanov
2018-11-08 22:23   ` tep_*host_bigendian() Steven Rostedt

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=20181108133053.6eb22596@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).