lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V3 8/9] tracing: Add osnoise tracer
From
Date
On 6/8/21 7:39 PM, Steven Rostedt wrote:
>> 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 ;-)

cool! I created a function osnoise_taint(char *msg) that prints the msg using
trace_array_printk_buf. I am using it instead of all pr_warn that could take
place inside osnoise regular operation.

I am still placing the note in the header, just in case we miss the message in
the log.

-- Daniel

> -- Steve
>

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