[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191017195140.GD3600@kernel.org>
Date: Thu, 17 Oct 2019 16:51:40 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
Tzvetomir Stoyanov <tstoyanov@...are.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] libtraceevent: perf script -g python segfaults
Em Thu, Oct 17, 2019 at 04:49:08PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Oct 17, 2019 at 03:37:33PM -0400, Steven Rostedt escreveu:
> > On Thu, 17 Oct 2019 16:28:32 -0300
> > Arnaldo Carvalho de Melo <arnaldo.melo@...il.com> wrote:
> >
> > > Em Thu, Oct 17, 2019 at 02:41:14PM -0400, Steven Rostedt escreveu:
> > > > On Thu, 17 Oct 2019 14:38:41 -0400
> > > > Steven Rostedt <rostedt@...dmis.org> wrote:
> > > >
> > > > > struct tep_event *trace_find_next_event(struct tep_handle *pevent,
> > > > > struct tep_event *event)
> > > > > {
> > > > > + static struct tep_event **all_events;
> > > > > static int idx;
> > > > > int events_count;
> > > > > - struct tep_event *all_events;
> > > >
> > > > If we are going to use static variables, let's make them all static and
> > > > optimize it a little more...
> > >
> > > I'll test it, but can't you have this somewhere else, i.e. at
> > > tep_handle perhaps?
> > >
> > >
> >
> > Or we can nuke the function entirely, it's a rather silly helper
> > anyway. Just do this:
>
> I like it, that is a good nuke use, nice button to press! :-)
>
> Testing it now...
Reported-by: Daniel Bristot de Oliveira <bristot@...hat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Works like a charm, thanks!
- Arnaldo
Powered by blists - more mailing lists