From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/perf,tools/lib/traceevent: Make traceevent APIs more consistent
Date: Fri, 22 Mar 2019 10:09:05 -0400 [thread overview]
Message-ID: <20190322100905.7d62691b@gandalf.local.home> (raw)
In-Reply-To: <20190322130816.13903-1-tstoyanov@vmware.com>
On Fri, 22 Mar 2019 15:08:16 +0200
Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:
> Rename few traceevent APIs, in order to make it more consistent:
> tep_pid_is_registered(), tep_file_bigendian(),
> tep_is_latency_format(), tep_get_header_page_ts_size(),
> tep_set_host_bigendian(), tep_is_host_bigendian() and
> tep_data_lat_fmt()
Note, change logs should be about "why" not "what". The above is mostly
about "what" although you did state "to make it more consistent" which
is a "why", but we should elaborate more. Something like this:
=====================================
Rename some traceevent APIs for consistency:
tep_pid_is_registered() to tep_is_pid_registered()
as the convention is "tep_is" not "tep_X_is".
tep_file_bigendian() to tep_is_file_bigendian()
as boolean operations will now have "tep_is_" notation
tep_get_header_page_ts_size() to tep_get_header_timestamp_size()
as the latter is more descriptive.
tep_set_host_bigendian() to tep_set_local_bigendian()
tep_is_host_bigendian() to tep_is_local_bigendian()
because "host" can be confused with VMs, and "local" is about the local
machine.
tep_host_bigendian() to tep_is_bigendian()
Again "host" is confusing and we are converting to "tep_is_" notation,
also this one checks the actual machine that is running. For
consistency we have:
bool tep_is_bigendian(void);
bool tep_is_file_bigendian(struct tep_handle *tep);
bool tep_is_local_bigendian(struct tep_handle *tep);
Where tep_is_X_bigendian(tep) returns the saved data in the tep handle,
and tep_is_bigendian() returns the running machine's endianess.
tep_data_lat_fmt() to tep_data_latency_format()
No need to obfuscate with shorten names here.
Switching all "tep_is_" functions to return bool and not int.
=====================================
That is much more descriptive of the change, and lets anyone that looks
at the git history see exactly why things have changed. With a more
descriptive change log, it will cause less arguments as well.
Please resend with an updated change log.
-- Steve
next prev parent reply other threads:[~2019-03-22 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 13:08 [PATCH] tools/perf,tools/lib/traceevent: Make traceevent APIs more consistent Tzvetomir Stoyanov
2019-03-22 14:09 ` Steven Rostedt [this message]
2019-03-22 14:34 ` 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=20190322100905.7d62691b@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.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).