Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2450536ybl; Thu, 29 Aug 2019 08:20:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKn2DzcfkLJaWy/JczEx1N+gr7MK6VIdHtlbvVGD2fE1ey5D0Ysnn0lklZGCdGdZ3v6A2E X-Received: by 2002:a17:90a:ac0a:: with SMTP id o10mr10523005pjq.143.1567092029654; Thu, 29 Aug 2019 08:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567092029; cv=none; d=google.com; s=arc-20160816; b=vmj0OQD14lrESOlsKnn/8DVmwF5YMi9g3dc/h4YNbJ5q1+26Dq+kPuCW+AkyhfR0Q1 CAREyZw4n13LWbezIWHLe9YBsX2oCtkrWPmkrVwRR+fMgC+Zi/Yxs9symq8BiB+lJjHm dzzLkpXGojjO0puBM/n4uO6IXGRCqC8+vmkcrGAbAQUHDNu4Bkuy+uZfNdlGuHCIR0gf aE1HQp0qXt7jHkyxwROBcgBK7qT+cnhi/6AIV7sy78l0r6nxg0PGUuV2krgpZ1ueZIQo wHEwGa1rbPwZaaxSYnKmqI2brISUsaQYfJyBExAuAu8C9PqxnVuuML4BCyRycuZpGES6 ZTBA== 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:dkim-signature; bh=VjZT57U4eqLLUOf/A7kG5jLpXDrO5TRWQ0yRpD8+fs8=; b=xnykPBaxPzG9BlHqUr8TtkMkLIlam/Axb/v0Rb0FuBiHgKEOYWq1/EA5tz1WAcnM42 M8Ju/I832DwIEaciOCmfjmGD4X/NFD9+AHQ41a6RgSgR4CrkwKXFHKFKTzAY6gE22lyr PfuGa2VjxjhVOvut8BF28D6EeoANB/mBI4fafXaeFtkKcTyQi2pbf1OT0utjBjrWF5Xu MdJvi6qhFNy6OAIpYE4j3VaI7+7qqwR9L+XTYCyGQWligsiZHwD+U9z4HbjaOuIBW7Hs TcraA0UY5IVYYwNaGjLcI8Y//e2MGT/CGMhVNA/LzZaBW9eehA51iou2Z7dSNkH+rugq gQVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eqh8mS8v; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q11si2275243pgq.282.2019.08.29.08.20.12; Thu, 29 Aug 2019 08:20:29 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Eqh8mS8v; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727364AbfH2PTS (ORCPT + 99 others); Thu, 29 Aug 2019 11:19:18 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56147 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfH2PTR (ORCPT ); Thu, 29 Aug 2019 11:19:17 -0400 Received: by mail-wm1-f65.google.com with SMTP id g207so176690wmg.5 for ; Thu, 29 Aug 2019 08:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VjZT57U4eqLLUOf/A7kG5jLpXDrO5TRWQ0yRpD8+fs8=; b=Eqh8mS8v9XFVZ4L8xgv9ExhhsT0fgxAjX1hIEZxB8Rg7zNCs97lpY237Q+w73u7zLZ dXE/Rwe6XWeUcyzNF5a+A+kNvg/eAwA6XbGGE8wz9+OrfL5caU8gLPhydUXFrOGfsgH/ 3E7mX5pwq8TGpL8OKdgQHnZDXvfzDH8CnL12HXRQYlMRAnkUQxu7ttR2zq2AC9seDhIS S1i7XZrkJL7QSnCU8J8BQ9Ms9l2TuTAzKm4Z0bwVHjg/iZZgjUuueYwVSbxneRQQjC75 xZhi4WdAUKxKG72Lz2/0qBNxiWWUKrpJF+2QoLAR+Vm4aZ3HQVZ8vuypd55dYE6Lv7N/ gGbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VjZT57U4eqLLUOf/A7kG5jLpXDrO5TRWQ0yRpD8+fs8=; b=aqJQdawuNrlg2lHckbrBW/SlmiLemnsZj4sYshebWBfZuJQKV5PpANCP8XXl0kOvfB H4Pa/ynnexkzdAvz9UoSakgfszoRN+iA5SPBtZnPbRAq80+idmfheR72vXIDY+82leEY MLC88IJR0VmPIvwrVDlfT4OJV4PnmJSqokkLQqTwvVyg70TAUBDdukkaIIYbbDXUs7K2 ky5fb27I1I0tjOt0y56+wrIOVzR8GyUfUTi72CYSI6onTGD5R3IXbf8QAxGBvWrz69iF 4Yz1VRUuxpjX/QcMujtCJBqxaYvus0sA60WSFm5ZvFsTGiszbvsLFWBlAKx/n9fMjJ6G ohgA== X-Gm-Message-State: APjAAAXm9T+8nbtAgwpuHWrcxmI793Oy1e7B/NaPdfa5MVxa3epsft9e frLDzlSw0MoQD1gTq24H6uGv2A== X-Received: by 2002:a1c:2582:: with SMTP id l124mr13029673wml.153.1567091955236; Thu, 29 Aug 2019 08:19:15 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id b15sm4253465wmb.28.2019.08.29.08.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 08:19:14 -0700 (PDT) Date: Thu, 29 Aug 2019 16:19:12 +0100 From: Daniel Thompson To: Amit Kucheria Cc: LKML , linux-arm-msm , Bjorn Andersson , Eduardo Valentin , Andy Gross , Stephen Boyd , Brian Masney , Marc Gonzalez , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui , Linux PM list Subject: Re: [PATCH v2 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements Message-ID: <20190829151912.z6cflsaox2qnmqxw@holly.lan> References: <93fa782bde9c66845993ff883532b3f1f02d99e4.1566907161.git.amit.kucheria@linaro.org> <20190829140459.szauzhennltrwvg4@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 07:58:45PM +0530, Amit Kucheria wrote: > On Thu, Aug 29, 2019 at 7:35 PM Daniel Thompson > wrote: > > > > On Tue, Aug 27, 2019 at 05:43:59PM +0530, Amit Kucheria wrote: > > > Printing the function name when enabling debugging makes logs easier to > > > read. > > > > > > Signed-off-by: Amit Kucheria > > > Reviewed-by: Stephen Boyd > > > Reviewed-by: Daniel Lezcano > > > > This should need to be manually added at each call site; it is already > > built into the logging system (the f flag for dynamic debug)? > > I assume you meant "shouldn't". Quite so. Sorry about that. > I haven't yet integrated dynamic debug into my daily workflow. > > Last time I looked at it, it was a bit bothersome to use because I > needed to lookup exact line numbers to trigger useful information. And > those line numbers constantly keep changing as I work on the driver, > so it was a bit painful to script. Not to mention the syntax to frob > the correct files in debugfs to enable this functionality. > > As opposed to this, adding the following to the makefile is so easy. :-) > > CFLAGS_tsens-common.o := -DDEBUG > > Perhaps I am using it all wrong? How would I go about using dynamic > debug instead of this patch? Throwing dyndbg="file .c +pf" onto the kernel command line is a good start (+p enables debug level prints, +f causes messages to include the function name). When the C files map to module names (whether the modules are actually built-in or not) then .dyndbg=+pf is a bit cleaner and allows you to debug the whole of a driver without how it is decomposed into files. There are (many) other controls to play with[1] but the above should be sufficient to simulate -DDEBUG . Daniel. [1] https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html