From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D58BC33C9E for ; Tue, 14 Jan 2020 17:30:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DC3224672 for ; Tue, 14 Jan 2020 17:30:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727285AbgANRar convert rfc822-to-8bit (ORCPT ); Tue, 14 Jan 2020 12:30:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:42546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbgANRar (ORCPT ); Tue, 14 Jan 2020 12:30:47 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB6372072B; Tue, 14 Jan 2020 17:30:44 +0000 (UTC) Date: Tue, 14 Jan 2020 12:30:43 -0500 From: Steven Rostedt To: Sean Paul Cc: dri-devel@lists.freedesktop.org, Sean Paul , Daniel Vetter , David Airlie , Jani Nikula , Joonas Lahtinen , Pekka Paalanen , Rob Clark , Thomas Zimmermann , Ville =?UTF-8?B?U3lyasOkbMOk?= , Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , Jonathan Corbet , linux-doc@vger.kernel.org, Peter Zijlstra , Jiri Olsa Subject: Re: [PATCH v4] drm/trace: Buffer DRM logs in a ringbuffer accessible via debugfs Message-ID: <20200114123043.3d92c65c@gandalf.local.home> In-Reply-To: <20200114172155.215463-1-sean@poorly.run> References: <20200114172155.215463-1-sean@poorly.run> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, 14 Jan 2020 12:21:43 -0500 Sean Paul wrote: > From: Sean Paul > > 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. You may want to rebase these on my tree that renames ring_buffer to trace_buffer. For more information, read this thread: https://lore.kernel.org/r/20191213153553.GE20583@krava My tree is currently being tested and when it finishes contingent on no errors found, I'll be pushing it to linux-next. https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/commit/?h=ftrace/core&id=13292494379f92f532de71b31a54018336adc589 -- Steve > > Cc: Daniel Vetter > Cc: David Airlie > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Pekka Paalanen > Cc: Rob Clark > Cc: Steven Rostedt > Cc: Thomas Zimmermann > Cc: Ville Syrjälä > Signed-off-by: Sean Paul > Link: https://patchwork.freedesktop.org/patch/msgid/20191010204823.195540-1-sean@poorly.run #v1 > Link: https://lists.freedesktop.org/archives/dri-devel/2019-November/243230.html #v2 > Link: https://patchwork.freedesktop.org/patch/msgid/20191212203301.142437-1-sean@poorly.run #v3 > > Changes in v2: > - Went with a completely different approach: > https://lists.freedesktop.org/archives/dri-devel/2019-November/243230.html > > Changes in v3: > - Changed commit message to be a bit less RFC-y > - Make class_drm_category_log an actual trace class > > Changes in v4: > - Instead of [ab]using trace events and the system trace buffer, use our > own ringbuffer > ---