lkml.org 
[lkml]   [2016]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] tools lib traceevent: Add -O2 option to traceevent
On Wed, 19 Oct 2016 15:05:48 -0300
Arnaldo Carvalho de Melo <acme@kernel.org> wrote:


> Some are the compiler not grokking logic where the compiler gets
> confused with logic that tests one variable to use another and thinks it
> is using garbage (uninitialized stuff), I tried to follow the logic and
> I think it got slightly more confused than me, as I _think_ its not a
> problem, but the one on the case entry for
>
> OLD_RINGBUF_TYPE_TIME_EXTEND
>
> in old_update_pointers() looks like a bug, unless some macro magic is
> taking place that updates that 'lenght' variable.
>
> Rostedt, that -O2 unleashed some warnings, please check, I'll defer
> applying those patches till it doesn't show these warnings, i.e. till
> other patches fixing these issues or simply silencing the compiler with
> a harmless init gets submitted,
>
> Thanks,

Note, that code is for the first version of the ftrace ring buffer that
got changed around 2.6.32 I believe. And since trace-cmd was the only
tool that directly looked at the code, I was able to "break" abi and
update trace-cmd to have a new version. So that code isn't even used
anywhere on newer kernels.

That said, could you add in the case statement for
OLD_RINGBUF_TYPE_TIME_EXTEND:

length = 0;

I think that should be fine.

-- Steve

\
 
 \ /
  Last update: 2016-10-19 21:24    [W:0.145 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site