Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2800168yba; Mon, 8 Apr 2019 05:08:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPiw2Wpj954t07elDNyBt2gkEZ++90/OZC7SAk6IotjqZhdEV75KNKc/wDXdn6FO/zXG8j X-Received: by 2002:a17:902:8483:: with SMTP id c3mr13026597plo.19.1554725330802; Mon, 08 Apr 2019 05:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554725330; cv=none; d=google.com; s=arc-20160816; b=Y1X+Cb4ihpbRSbT/YftO6pod5Raz7LhSQ2MZwTjMZUCvO4onXUzn9nF4JYW0f6bQhs iIua18mw7JpSsjUMSIgCMrCehO0B6roHicpL4giM4ZN5USHmuBUAl9t+mDIWonPAq9Ic iNQ2SBr6wa0xhfbnjy4zqGwRH9tR48B2QkVFquFQUgjayEOHpK5oho8O0mK7zIZPzrFK vsew3IJKmZIl9RaIPmEVtCGOvOmPKGhohR05XP6wTGJFmgip05jYOJWfLTr1i5gla76f zSoQyJ1MCrwldvMcodTf25LlhO5PzsJRr9UHMqG53koM7BVrgt/8WuL1FLOuGJJyOAf/ JPuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EXHpKR7PKzOhJX1k8FSaE6XI+iyf16jrdpgrY3Bb3yw=; b=qkd7DcPDF9O/YFcLELtCMJwO4t+t17HCNENrnEztkVi6K9cAN23zsFwKayBR7JAzKq vIA24zvLSQqhPDd3yD1gKbnSQv5oea0derFEX2//X2J9CQJlLG+6n8wU+XAGu3pA8WhB LFCjZ+FfIVXAHFwzDwfD3waiCGGza8TNFwpDdd7wyjxAS+oZX9C//M0RMLBj210TnJCH u74SyZAhKY2fX4zKx5429UYMar1UXCS7RplsEcv+cHzg050qvW8AC/W0rwNGIeGM7BPB gfPzmWw4YpHVFOxwWyFivtGCzFiKRPulDsWWMuC/MDr2bnOMAhQnC81Es6UZOimqBOYo 7+6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si26319268pgm.385.2019.04.08.05.08.34; Mon, 08 Apr 2019 05:08:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbfDHMHm (ORCPT + 99 others); Mon, 8 Apr 2019 08:07:42 -0400 Received: from mga18.intel.com ([134.134.136.126]:53002 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbfDHMHm (ORCPT ); Mon, 8 Apr 2019 08:07:42 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 05:07:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,325,1549958400"; d="scan'208";a="132398440" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga008.jf.intel.com with ESMTP; 08 Apr 2019 05:07:38 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hDT3o-0007Tr-Km; Mon, 08 Apr 2019 15:07:36 +0300 Date: Mon, 8 Apr 2019 15:07:36 +0300 From: Andy Shevchenko To: "Life is hard, and then you die" Cc: Greg Kroah-Hartman , Dmitry Torokhov , Henrik Rydberg , Sergey Senozhatsky , Steven Rostedt , "Rafael J. Wysocki" , Lukas Wunner , Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] driver core: add dev_print_hex_dump() logging function. Message-ID: <20190408120736.GN9224@smile.fi.intel.com> References: <20190327014807.7472-1-ronald@innovation.ch> <20190327014807.7472-4-ronald@innovation.ch> <20190327023757.GB20766@kroah.com> <20190328002817.GF24753@innovation.ch> <20190328052917.GB18668@kroah.com> <20190328102755.GA26446@innovation.ch> <20190328112952.GA2232@kroah.com> <20190402024714.GA14213@innovation.ch> <20190402063326.GB7218@kroah.com> <20190407014613.GA14812@innovation.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190407014613.GA14812@innovation.ch> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 06, 2019 at 06:46:13PM -0700, Life is hard, and then you die wrote: > > On Mon, Apr 01, 2019 at 07:47:14PM -0700, Life is hard, and then you die wrote: > > > On Thu, Mar 28, 2019 at 12:29:52PM +0100, Greg Kroah-Hartman wrote: > > > > On Thu, Mar 28, 2019 at 03:27:55AM -0700, Life is hard, and then you die wrote: > > > > > On Thu, Mar 28, 2019 at 06:29:17AM +0100, Greg Kroah-Hartman wrote: > > > > > > On Wed, Mar 27, 2019 at 05:28:17PM -0700, Life is hard, and then you die wrote: > > > > > > > On Wed, Mar 27, 2019 at 11:37:57AM +0900, Greg Kroah-Hartman wrote: > > > > > > > > On Tue, Mar 26, 2019 at 06:48:06PM -0700, Ronald Tschal?r wrote: > > You can do dynamic debugging from the kernel command line, if your code > > is built into the kernel (but why would a tiny driver under testing like > > this, not be built into the kernel?) what specifically did not work for you? > > This may be part of our disconnect: there's almost no reason (and > several downsides) to building it into the kernel instead of as a > module: > > - When developing, being able to just reload the module instead of > rebooting is just so much faster and more convenient. modprobe -r foo modprobe foo dyndbg=... Not an argument. > - For other users, having them build the driver as a dkms managed > module is also by far the simplest and least error-prone approach - > explaning to users how to rebuild their kernel (something most of > them have never done) takes a bunch of time and effort on both > sides for essentially no gain. > > - Once the driver is part of the regular kernel, practically all > distro's will build it as a module (at least I'm fairly certain > about this). Above seems a sub-items to the first one. So, reloading module with dyndbg parameter is quite flexible. What else? > > You can enable/disable logging per-function, which is what you want, > > right? > > Yes'ish: the problem is that if they are just part of regular > functions, A) the chances are higher that the function may get renamed > and hence any existing debug instructions broken, and B) this doesn't > work if there are multiple debug statements in a function. Hence my > assertion that for this work well (and yes, it can work well) you > basically need to create a separate function for each debug statement > (which that contains just that debug statement) (a sort of stable > labelling of each debug statement). I guess you tried and have an examples? -- With Best Regards, Andy Shevchenko