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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37437C433EF for ; Fri, 12 Nov 2021 11:51:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F327060E8F for ; Fri, 12 Nov 2021 11:51:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F327060E8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=axis.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G0SXSwoTGASXecQ1EF/67QdcRxUkan4TcGGuVBIALAk=; b=nLc+B+Sm9OoPHV TJA3zwqQbhh+yBwh4986oe6VpDODoz0qvG9sfgLFgxUz+eHVKqGNuTXUNJU9aQ7Pm61Bul8rTnkhk 8LFb7lSnKI4BldVSPoy6kVtWFJh648bVDIWKMhxOAcRxZcQJbkN1tCTcMmT4n9nuvkYgZZCqErjOJ bK5bYpjICCJUx1QZxJKIo9GNvjrRIb8VMJW2sMcW6DmqALd4RFESAy9glICHpVLJ+whcHIut6R47K Ac4p46MEjHUFeqGn9uhmOz67h2KEizZhndErygw6EOOdHF/HBXH3GcBsV4BKIvDQv07zgAM2fSh7D lIjUrREd8SJlHwYIShhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlV4I-00AAp5-EM; Fri, 12 Nov 2021 11:50:06 +0000 Received: from smtp2.axis.com ([195.60.68.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlV4D-00AAlM-Um for linux-arm-kernel@lists.infradead.org; Fri, 12 Nov 2021 11:50:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1636717802; x=1668253802; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pKNzvHA+abG5/SB0rgSIMnr0AelDwIA74K7UU91Gfho=; b=hBCbpAOATmcezc99MwliWJt8AJCEna6SqLDZY4sLUGRj0R/jPq1StHiK X5pX3zmekdMNG/AvPbDxK8QZnj4IZNIZjf15esqVDimB+8pHKDclaKyxN MjmWH6UoacihIdH86S0I+ZtG3oIu3RMymBOzNa1t/wYzQ+JZ3tkgiHey1 AVO2SRuLsT0KUfgcgdY4wHw/tcBTig+wqzxVXz+DgiBl60Jw/ahVRUy+2 6MRT3KzRvNV9UZfL3zzuVIJvlJCFllMvtATNjh4UhnMZarCSGIs4kz87/ uqsIuxHtjFwAEGAIVpxuj00vpfe84xfotqsV8KjmJuUnN8HjMQhrxNWgG w==; Date: Fri, 12 Nov 2021 12:49:54 +0100 From: Vincent Whitchurch To: Jim Cromie CC: , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v10 08/10] dyndbg: add print-to-tracefs, selftest with it - RFC Message-ID: <20211112114953.GA1381@axis.com> References: <20211111220206.121610-1-jim.cromie@gmail.com> <20211111220206.121610-9-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211111220206.121610-9-jim.cromie@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211112_035002_449592_4334614E X-CRM114-Status: GOOD ( 15.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 11, 2021 at 03:02:04PM -0700, Jim Cromie wrote: > Sean Paul proposed, in: > https://patchwork.freedesktop.org/series/78133/ > drm/trace: Mirror DRM debug logs to tracefs > > His patchset's objective is to be able to independently steer some of > the drm.debug stream to an alternate tracing destination, by splitting > drm_debug_enabled() into syslog & trace flavors, and enabling them > separately. 2 advantages were identified: > > 1- syslog is heavyweight, tracefs is much lighter > 2- separate selection of enabled categories means less traffic > > Dynamic-Debug can do 2nd exceedingly well: > > A- all work is behind jump-label's NOOP, zero off cost. > B- exact site selectivity, precisely the useful traffic. > can tailor enabled set interactively, at shell. > > Since the tracefs interface is effective for drm (the threads suggest > so), adding that interface to dynamic-debug has real potential for > everyone including drm. > > if CONFIG_TRACING: > > Grab Sean's trace_init/cleanup code, use it to provide tracefs > available by default to all pr_debugs. This will likely need some > further per-module treatment; perhaps something reflecting hierarchy > of module,file,function,line, maybe with a tuned flattening. > > endif CONFIG_TRACING > > Add a new +T flag to enable tracing, independent of +p, and add and > use 3 macros: dyndbg_site_is_enabled/logging/tracing(), to encapsulate > the flag checks. Existing code treats T like other flags. I posted a patchset a while ago to do something very similar, but that got stalled for some reason and I unfortunately didn't follow it up: https://lore.kernel.org/lkml/20200825153338.17061-1-vincent.whitchurch@axis.com/ A key difference between that patchset and this patch (besides that small fact that I used +x instead of +T) was that my patchset allowed the dyndbg trace to be emitted to the main buffer and did not force them to be in an instance-specific buffer. That feature is quite important at least for my use case since I often use dyndbg combined with function tracing, and the latter doesn't work on non-main instances according to Documentation/trace/ftrace.rst. For example, here's a random example of a bootargs from one of my recent debugging sessions: trace_event=printk:* ftrace_filter=_mmc*,mmc*,sd*,dw_mci*,mci* ftrace=function trace_buf_size=20M dyndbg="file drivers/mmc/* +x" _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel