Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2990177pxa; Tue, 25 Aug 2020 08:33:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXtpvXxIwnzAZc0EPzLKRCpQt0Mt2KUU5EVn74ZhAqarPahkaOnsdGZGM0kiFxx1vO6CNx X-Received: by 2002:a17:906:b850:: with SMTP id ga16mr2849117ejb.101.1598369612464; Tue, 25 Aug 2020 08:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598369612; cv=none; d=google.com; s=arc-20160816; b=QZvmtHjcvil7bYKR2HABz9QCYrfRB7+/kDJ8Dh6HrjwKXW8TURBFbctcIymBZqZ9cN kg0mJ3lawIvi4JEPctUfonK1EzNzDN2Vw3Z2y1SV993Kms/WL6H/59Ic6RQOa1x3J4oF oOIFgWGO8AI2L1UZrOsQv+W83dRWTR87tqdwQ+KOVb2aj+cUuO3d4GJeNToXJoCEWCo7 MTSOF3SQNZaf3NSWEMFGS1shw2vqAxSL7auzPP5tOo6dIZWjFBsSh5aLC8wCigddQob+ nOUjiqfkIwib+Kcu7m3JogtJEYvWNTcIrxtgJktoMDiFao7TbzGOUMzHb5vvzo3eKLCX MSuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:dkim-signature; bh=FEYwXhWljaFx0OCs78pPD+h9euvq1wZYQ/pI8U2vu4Y=; b=UXBEfiHDbxjT10yCiwQlv8DcCmkhZTvRDp8vo86aGjRkrYZJ40Nc6/zFt2q07jkx6n nWgw/7aRprR5ouH0M4EoZpcZFZJwRV0zGaZ4mmw1Z0g0LpDRIFUP24Eey52o9LICdpAL 75OTAjSmvY8mm5mKStIiLtycLoEI4Qlg4pnoRk7Nsxg9wEknvYuY9hYCUuig6PoU5TUo d1eJ1Vi1BQQJMkl6v06HKLcbRsgYHn/K2sqnFYr/PJhIbZwB7vFGoqn5QPmJYoVphIrZ aO7NNweDkVdlVIiGntAMU1m6dCdSAWyI5hPFmc+XGpELBd8hEsHqTfbYbZuBY+3konrg 964w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b="Ki/XfYV1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v9si8342855ejy.486.2020.08.25.08.33.08; Tue, 25 Aug 2020 08:33:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b="Ki/XfYV1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbgHYPcc (ORCPT + 99 others); Tue, 25 Aug 2020 11:32:32 -0400 Received: from smtp2.axis.com ([195.60.68.18]:42669 "EHLO smtp2.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbgHYPca (ORCPT ); Tue, 25 Aug 2020 11:32:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; l=2284; q=dns/txt; s=axis-central1; t=1598369549; x=1629905549; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FEYwXhWljaFx0OCs78pPD+h9euvq1wZYQ/pI8U2vu4Y=; b=Ki/XfYV13p2EqOHmbJHfunp/zSD1LKvEt+E99u+KX8hD75Cd+N9CiXUO 5VBqkWD/wxB0v+MqIhqTAEp1b8s4jPiitV62j11FPRa337zaYG1wb/b8w 9Salul4r02bMhEGeMEU1eLkrBBQ0lzX5Ads2ep5ZiSererX9wH3JoQ4ux 1fpbrsF+pCqeC0cgXxfRCa1/X0MSiSLbPsIcXq2AgKgGWMhySbJNRASVq KrGobHYWCIjQRjEbeXzfi0GksY2dfJMRlx1zXxcv1yCn6vpKH45WCdsZs KTLAlnYg0XO/L/ZM6tnR5XVIDllU6T+NvukDRq8Khdks+iAFjqSTnWey/ w==; IronPort-SDR: O9KKHBLHejNa4FglqdFKgx6ChmeIyjuhpF8ry34KKfai+H0HoHNf2tMj5izCWsN+2VO2LG9k7Z mAr1QnwXZS7JJ1WhPhQSKJtiPc0C4K3O2ehZNt7S0m/6A5LOBT/JB/kfGjY4OiYo0bUHmmkkN/ kA7CzpOti8EnoOd9IwUEronwoSFjYvH7QIrP6/JTZyoZJEMCQergDudQSeS9UvU+Ps/yOHgIyJ GAVy31z9ul6ez4MS/oz06Cw919SluLZ810peXtJ2eHC841Dfuy7KT3ZcfvxHzcvmk/MT7KjSB9 mlE= X-IronPort-AV: E=Sophos;i="5.76,353,1592863200"; d="scan'208";a="11853079" Date: Tue, 25 Aug 2020 17:32:26 +0200 From: Vincent Whitchurch To: Jason Baron CC: Steven Rostedt , "mingo@redhat.com" , kernel , "corbet@lwn.net" , "pmladek@suse.com" , "sergey.senozhatsky@gmail.com" , "john.ogness@linutronix.de" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] dynamic debug: allow printing to trace event Message-ID: <20200825153226.2wturxg7zu3bw5li@axis.com> References: <20200814133151.7759-1-vincent.whitchurch@axis.com> <20200814131531.01b43c91@oasis.local.home> <461439ab-0720-e3cc-f49f-f294fbba4129@akamai.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <461439ab-0720-e3cc-f49f-f294fbba4129@akamai.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 11:30:34PM +0200, Jason Baron wrote: > On 8/14/20 1:15 PM, Steven Rostedt wrote: > > On Fri, 14 Aug 2020 15:31:51 +0200 > > Vincent Whitchurch wrote: > >> index aa9ff9e1c0b3..f599ed21ecc5 100644 > >> --- a/include/linux/dynamic_debug.h > >> +++ b/include/linux/dynamic_debug.h > >> @@ -27,13 +27,16 @@ struct _ddebug { > >> * writes commands to /dynamic_debug/control > >> */ > >> #define _DPRINTK_FLAGS_NONE 0 > >> -#define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ > >> +#define _DPRINTK_FLAGS_PRINTK (1<<0) /* printk() a message using the format */ > > > > The above looks like a cleanup unrelated to this patch, and probably > > should be on its own. > > I read it as we used to have this one thing called 'print', which really meant > printk, but now that we also have the ability to output to the trace buffer, > what does 'print' mean now? So I read it as being part of this change. Yes, that's what was intended, but I think it makes sense to split it out as Steven suggested so I've done that now (and also renamed the combined flag to the less ambiguous _DPRINTK_FLAGS_ENABLE). > > > > >> #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1) > >> #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) > >> #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) > >> #define _DPRINTK_FLAGS_INCL_TID (1<<4) > >> +#define _DPRINTK_FLAGS_TRACE (1<<5) > >> +#define _DPRINTK_FLAGS_PRINT (_DPRINTK_FLAGS_PRINTK | \ > >> + _DPRINTK_FLAGS_TRACE) > > > Is _DPRINTK_FLAGS_PRINT actually used anywhere? Looks to me like > it can be removed. It's used from DYNAMIC_DEBUG_BRANCH() as well as from lib/dynamic_debug.c to check if the location is enabled. > This is a feature I've wanted for dynamic debug for a while. Thanks for > implementing it! > > Dynamic can be enabled on the command line in order to print things early > in boot (I think ftrace can as well), I want to make sure that there are > no ordering issues here? And things wouldn't blow up if we enable printing > to the ftrace buffer early on via dyanmic debug? I tried enabling all dynamic debug locations and tracing via the command line and that worked fine: dyndbg="file * +x" trace_event=printk:*