From: Tzvetomir Stoyanov <tstoyanov@vmware.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Matt Helsley <mhelsley@vmware.com>,
"linux-trace-devel@vger.kernel.org"
<linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH 3/3] tools/lib/traceevent: Implement new traceevent APIs for accessing struct tep_handler fields
Date: Fri, 22 Mar 2019 12:49:17 +0000 [thread overview]
Message-ID: <CACqStoejVbMfAp2homPJbWEifOS9+cGDNKNhZyLhmSY9OM_t3Q@mail.gmail.com> (raw)
In-Reply-To: <20190322081644.7762c325@gandalf.local.home>
On Fri, Mar 22, 2019 at 2:16 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 22 Mar 2019 11:33:47 +0000
> Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:
>
>
> > > >
> > > > int tep_host_bigendian(void);
> > >
> > > Rename to: bool tep_is_bigendian()
> >
> > Steven, int tep_host_bigendian(void) actually checks the endianness of
> > the host -
> > I think it makes sens "host" to be part of API's name. The other one:
> > int tep_is_host_bigendian(struct tep_handle *pevent) checks the
> > endianness stored
> > in the tep_handle, I think we should remove "host" from its name.
> >
>
> I hate the word "host" here. Because what would you get if you run this
> on a guest? You get the "guest" endianess (which may possibly be not
> the same as the host (if emulated)).
>
>
> I want to keep this as "tep_is_bigendian()" as it doesn't take a
> parameter, and is obvious to what it is returning.
>
> > > > int tep_file_bigendian(struct tep_handle *pevent);
> > >
> > > Rename to: bool tep_is_file_bigendian()
> > >
> > > > void tep_set_file_bigendian(struct tep_handle *pevent, enum tep_endian endian);
> > > > int tep_is_host_bigendian(struct tep_handle *pevent);
> > >
> > > Rename to: bool tep_is_host_bigendian()
> > >
>
> Let's rename this to:
>
> void tep_set_local_bigendian()
> bool tep_is_local_bigendian()
>
> It can be argued that this could be for the above (test this machine),
> but since the "test this machine" doesn't take a parameter, but "test
> the pevent bigendian" does, I want it to be consistent with
> tep_is_file_bigendian(), which also takes a parameter.
>
> bool tep_is_bigendian(void);
> bool tep_is_file_bigendian(struct tep_handle *tep);
> bool tep_is_local_bigendian(struct tep_handle *tep);
>
> seems more consistent than:
>
> bool tep_is_local_bigendian(void);
> bool tep_is_file_bigendian(struct tep_handle *tep);
> bool tep_is_bigendian(struct tep_handle *tep);
>
> So lets go with the first one.
>
> Make sense?
>
> -- Steve
Yes, thanks Steven
--
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center
prev parent reply other threads:[~2019-03-22 12:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 11:19 [PATCH 0/3] Few patches, related to libtracevent APIs Tzvetomir Stoyanov
2019-03-19 11:19 ` [PATCH 1/3] tools/lib/traceevent: Change description of few APIs Tzvetomir Stoyanov
2019-03-20 15:48 ` Matt Helsley
2019-03-19 11:19 ` [PATCH 2/3] tools/lib/traceevent: Coding style fixes Tzvetomir Stoyanov
2019-03-20 15:53 ` Matt Helsley
2019-03-19 11:19 ` [PATCH 3/3] tools/lib/traceevent: Implement new traceevent APIs for accessing struct tep_handler fields Tzvetomir Stoyanov
2019-03-20 16:32 ` Matt Helsley
2019-03-21 9:26 ` Tzvetomir Stoyanov
2019-03-21 10:03 ` Tzvetomir Stoyanov
2019-03-21 12:59 ` Steven Rostedt
2019-03-21 19:24 ` Steven Rostedt
2019-03-21 19:46 ` Steven Rostedt
2019-03-22 11:33 ` Tzvetomir Stoyanov
2019-03-22 12:16 ` Steven Rostedt
2019-03-22 12:49 ` Tzvetomir Stoyanov [this message]
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=CACqStoejVbMfAp2homPJbWEifOS9+cGDNKNhZyLhmSY9OM_t3Q@mail.gmail.com \
--to=tstoyanov@vmware.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=mhelsley@vmware.com \
--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 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).