lkml.org 
[lkml]   [2020]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dynamic debug: allow printing to trace event
On Thu, 23 Jul 2020 12:57:35 +0200
Vincent Whitchurch <vincent.whitchurch@axis.com> wrote:

> Would it be acceptable to just use a fixed size for the event? At least
> for my own debugging use cases it's preferable to just have to increase
> the trace buffer size in case it's insufficient, rather than to have to
> restort to one-off debugging code.

There's two other options.

Option 1, is to allocate 256 bytes times 4 (in case of interruption,
where you have a separate buffer for every context - normal, softirq,
irq, nmi), and use it like I do for stack traces in the latest kernel
(see __ftrace_stack_trace() in kernel/trace/trace.c)

Option 2, would be to use trace_array_vprintk(), but you need to create
your own instance to do so to keep from messing with the top level buffer.

-- Steve


\
 
 \ /
  Last update: 2020-07-23 17:27    [W:3.937 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site