lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 8/9] tracing: Add osnoise tracer
On Tue, 8 Jun 2021 19:17:55 +0200
Daniel Bristot de Oliveira <bristot@redhat.com> wrote:

> On 6/4/21 11:28 PM, Steven Rostedt wrote:
> >> + /*
> >> + * This is an evidence of race conditions that cause
> >> + * a value to be "discounted" too much.
> >> + */
> >> + if (duration < 0)
> >> + pr_err("int safe negative!\n");
> > Probably want to have this happen at most once a run. If something were
> > to break, I don't think we want this to live lock the machine doing
> > tons of prints. We could have a variable stored on the
> > osnoise_variables that states this was printed. Check that variable to
> > see if it wasn't printed during a run (when current_tracer was set),
> > and print only once if it is.
>
> I created a "bool tainted" variable, that is set true if any problem with time()
> related functions happen. I will pr_warn that there is a problem on _start(),
> but also print this info at the top of the tracer header, so it is clear also
> from the trace output.
>
> Thoughts?
>

Or perhaps have that pr_err() actually be written into the trace buffer?

You can use

trace_array_printk_buf(tr->array_buffer.buffer, _THIS_IP_, "string");

without it triggering that nasty trace_printk() notice ;-)

-- Steve

\
 
 \ /
  Last update: 2021-06-08 19:40    [W:1.954 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site