Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-08-01 Thread Steven Rostedt
On Fri, 26 Jul 2019 13:55:44 -0700 Andres Freund wrote: > > Care to send a formal patch? > > Will do. Hi Andres, Have you had a chance to send a patch? Thanks! -- Steve

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-07-26 Thread Steven Rostedt
On Fri, 26 Jul 2019 13:55:44 -0700 Andres Freund wrote: > How about my proposal to instead change the loops in > trace-event-{python,perl}.c, the only callers of trace_find_next_event, > to be something akin to > > [idx_type_for_tep_get_event] event_count = tep_get_events_count(pevent); > for

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-07-26 Thread Andres Freund
Hi, On 2019-07-26 09:12:00 -0400, Steven Rostedt wrote: > On Thu, 25 Jul 2019 20:58:29 -0700 > Andres Freund wrote: > > > > Is just plain wrong, as: > > > > > - return pevent->events[idx]; > > > + return (all_events + idx); > > > > that's not a valid conversion. ->events

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-07-26 Thread Steven Rostedt
On Thu, 25 Jul 2019 20:58:29 -0700 Andres Freund wrote: > Hi, > Hi Andres, > On 2018-10-05 12:22:25 -0400, Steven Rostedt wrote: > > From: Tzvetomir Stoyanov > > > > As traceevent is going to be transferred into a proper library, > > its local data should be protected from the library users.

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-07-26 Thread Tzvetomir Stoyanov
Hi Andres, On Fri, Jul 26, 2019 at 6:58 AM Andres Freund wrote: > > Hi, > ... > > Is just plain wrong, as: > > > - return pevent->events[idx]; > > + return (all_events + idx); > > that's not a valid conversion. ->events isn't an array of tep_handle, > it's an array of

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2019-07-25 Thread Andres Freund
Hi, On 2018-10-05 12:22:25 -0400, Steven Rostedt wrote: > From: Tzvetomir Stoyanov > > As traceevent is going to be transferred into a proper library, > its local data should be protected from the library users. > This patch encapsulates struct tep_handler into a local header, > not visible

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Steven Rostedt
in. This patch has some whitespace issues that > > need to be cleaned up. > > Ah, that if( thing? ?I can fix it here, holler if there is more than > that. Well, here's a fixed up version anyway... -- Steve >From 96dd7937a31d3a715c450c9a67f62a0022cd6a7c Mon Sep 17 00:00:00 2

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Steven Rostedt
in. This patch has some whitespace issues that > > need to be cleaned up. > > Ah, that if( thing? ?I can fix it here, holler if there is more than > that. Well, here's a fixed up version anyway... -- Steve >From 96dd7937a31d3a715c450c9a67f62a0022cd6a7c Mon Sep 17 00:00:00 2

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 12:28:46PM -0400, Steven Rostedt escreveu: > On Fri, 5 Oct 2018 12:22:25 -0400 > Steven Rostedt wrote: > > > +/** > > + * tep_get_first_event - returns the first event in the events array > > + * @tep: a handle to the tep_handle > > + * > > + * This returns pointer to the

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 12:28:46PM -0400, Steven Rostedt escreveu: > On Fri, 5 Oct 2018 12:22:25 -0400 > Steven Rostedt wrote: > > > +/** > > + * tep_get_first_event - returns the first event in the events array > > + * @tep: a handle to the tep_handle > > + * > > + * This returns pointer to the

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 12:22:25PM -0400, Steven Rostedt escreveu: > > From: Tzvetomir Stoyanov > > As traceevent is going to be transferred into a proper library, > its local data should be protected from the library users. > This patch encapsulates struct tep_handler into a local header, >

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-08 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 12:22:25PM -0400, Steven Rostedt escreveu: > > From: Tzvetomir Stoyanov > > As traceevent is going to be transferred into a proper library, > its local data should be protected from the library users. > This patch encapsulates struct tep_handler into a local header, >

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-05 Thread Steven Rostedt
On Fri, 5 Oct 2018 12:22:25 -0400 Steven Rostedt wrote: > +/** > + * tep_get_first_event - returns the first event in the events array > + * @tep: a handle to the tep_handle > + * > + * This returns pointer to the first element of the events array > + * If @tep is NULL, NULL is returned. > + */

Re: [PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-05 Thread Steven Rostedt
On Fri, 5 Oct 2018 12:22:25 -0400 Steven Rostedt wrote: > +/** > + * tep_get_first_event - returns the first event in the events array > + * @tep: a handle to the tep_handle > + * > + * This returns pointer to the first element of the events array > + * If @tep is NULL, NULL is returned. > + */

[PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-05 Thread Steven Rostedt
From: Tzvetomir Stoyanov As traceevent is going to be transferred into a proper library, its local data should be protected from the library users. This patch encapsulates struct tep_handler into a local header, not visible outside of the library. It implements also a bunch of new APIs, which

[PATCH] tools/lib/traceevent, tools/perf: Move struct tep_handler definition in a local header file

2018-10-05 Thread Steven Rostedt
From: Tzvetomir Stoyanov As traceevent is going to be transferred into a proper library, its local data should be protected from the library users. This patch encapsulates struct tep_handler into a local header, not visible outside of the library. It implements also a bunch of new APIs, which