lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 22 Mar 2019 10:09:05 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Tzvetomir Stoyanov <tstoyanov@...are.com>
Cc:     linux-trace-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/perf,tools/lib/traceevent: Make traceevent APIs
 more consistent

On Fri, 22 Mar 2019 15:08:16 +0200
Tzvetomir Stoyanov <tstoyanov@...are.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ