Re: [PATCH V3 8/9] tracing: Add osnoise tracer
From: Daniel Bristot de Oliveira
Date: Tue Jun 08 2021 - 15:35:41 EST
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
>