Thread (17 messages) 17 messages, 6 authors, 2020-01-27

Re: [PATCH v4] drm/trace: Buffer DRM logs in a ringbuffer accessible via debugfs

From: Daniel Vetter <hidden>
Date: 2020-01-27 08:59:01
Also in: dri-devel

On Wed, Jan 22, 2020 at 10:39:15AM -0500, Sean Paul wrote:
On Wed, Jan 22, 2020 at 3:06 AM Daniel Vetter [off-list ref] wrote:
quoted
On Mon, Jan 20, 2020 at 01:56:21PM -0500, Steven Rostedt wrote:
quoted
On Thu, 16 Jan 2020 07:27:22 +0100
Daniel Vetter [off-list ref] wrote:
quoted
On Tue, Jan 14, 2020 at 12:21:43PM -0500, Sean Paul wrote:
quoted
From: Sean Paul <redacted>

This patch uses a ring_buffer to keep a "flight recorder" (name credit Weston)
of DRM logs for a specified set of debug categories. The user writes a
bitmask of debug categories to the "trace_mask" node and can read log
messages from the "trace" node.

These nodes currently exist in debugfs under the dri directory. I
intended on exposing all of this through tracefs originally, but the
tracefs entry points are not exposed, so there's no way to create
tracefs files from drivers at the moment. I think it would be a
worthwhile endeavour, but one requiring more time and conversation to
ensure the drm traces fit somewhere sensible.
Hm, since the idea is to ship this in production environments debugfs is
out. sysfs is also kinda the wrong thing, so maybe trying to get this
stuffed into tracefs is actually the way to go?
Why not use normal tracepoints and the tracing infrastructure? You can
add your own instance as rasdaemon does, which isn't affected by other
tracing. There's code now to even create these instances and enable and
disable events from within the kernel.

  https://lore.kernel.org/lkml/1574276919-11119-1-git-send-email-divya.indi@oracle.com/ (local)
Hm, without looking at the details this indeed seems like the thing we
want ... Sean?
Ohh indeed, I think we could make this work. Thanks for the pointer, Steven!

The only item that needs sorting is: how does userspace select which
debug events are traced. I think we could solve both with another
module parameter to sit beside drm.debug with the same semantics (call
it drm.trace)?
Yeah if there's no official way (in tracefs) for this drm.trace sounds reasonable.
-Daniel
Sean
quoted
-Daniel
quoted
As this is tracefs, you can mount it without even compiling in debugfs.

-- Steve
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help