linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Matt Helsley <mhelsley@vmware.com>
Cc: Tzvetomir Stoyanov <tstoyanov@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: Thu, 21 Mar 2019 15:46:02 -0400	[thread overview]
Message-ID: <20190321154602.5c49bd38@gandalf.local.home> (raw)
In-Reply-To: <854FD5EF-691D-4BF2-8A1D-FBF6863B5C19@vmware.com>

On Wed, 20 Mar 2019 16:32:25 +0000
Matt Helsley <mhelsley@vmware.com> wrote:

> > 				    unsigned long long *addrp, char **modp);
> > -void tep_set_flag(struct tep_handle *tep, int flag);
> > +void tep_set_flag(struct tep_handle *tep, enum tep_flag flag);
> > +void tep_reset_flag(struct tep_handle *tep, enum tep_flag flag);
> > +int tep_check_flag(struct tep_handle *tep, enum tep_flag flag);
> > 
> > static inline int tep_host_bigendian(void)
> > {  
> 
> Does another series rename this to: tep_is_host_bigendian() ?

I've been looking at the API and I think we do need to make it more
consistent. What we currently have is:


> void tep_set_flag(struct tep_handle *tep, enum tep_flag flag);
> void tep_reset_flag(struct tep_handle *tep, enum tep_flag flag);

(I'll ignore parameters)

Rename to: void tep_clear_flag()

> int tep_check_flag(struct tep_handle *tep, enum tep_flag flag);

Rename to: bool tep_test_flag()


> 
> int tep_host_bigendian(void);

Rename to: bool tep_is_bigendian()

(Break from the confusion to what a "host" is)

> 
> int tep_set_function_resolver(struct tep_handle *pevent,
> 			      tep_func_resolver_t *func, void *priv);
> void tep_reset_function_resolver(struct tep_handle *pevent);
> int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid);
> int tep_override_comm(struct tep_handle *pevent, const char *comm, int pid);
> int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock);
> int tep_register_function(struct tep_handle *pevent, char *name,
> 			  unsigned long long addr, char *mod);
> int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
> 			      unsigned long long addr);
> int tep_pid_is_registered(struct tep_handle *pevent, int pid);

Rename to: bool tep_is_pid_registered()


> 
> int tep_get_cpus(struct tep_handle *pevent);
> void tep_set_cpus(struct tep_handle *pevent, int cpus);
> 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_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()

> void tep_set_host_bigendian(struct tep_handle *pevent, enum tep_endian endian);
> int tep_is_latency_format(struct tep_handle *pevent);

Rename to: bool tep_is_latency_format()

> void tep_set_latency_format(struct tep_handle *pevent, int lat);
> int tep_get_header_page_size(struct tep_handle *pevent);
> void tep_set_parsing_failures(struct tep_handle *tep, int parsing_failures);
> int tep_get_parsing_failures(struct tep_handle *tep);
> int tep_get_header_page_ts_size(struct tep_handle *tep);

Rename to: int tep_get_header_timestamp_size()

> int tep_is_old_format(struct tep_handle *pevent);

Rename to: bool tep_is_old_format()

These changes may need to be broken up into separate patches.

-- Steve

  parent reply	other threads:[~2019-03-21 19:46 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 [this message]
2019-03-22 11:33       ` Tzvetomir Stoyanov
2019-03-22 12:16         ` Steven Rostedt
2019-03-22 12:49           ` Tzvetomir Stoyanov

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=20190321154602.5c49bd38@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mhelsley@vmware.com \
    --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).