Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp144065ybi; Tue, 16 Jul 2019 17:59:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXv/zv0YjrPANMHUfDBoArCC0vAotV9w/p/w6xaxOdJWkEk61yke7I0cqxZ5TxYxTrzsPm X-Received: by 2002:a65:614a:: with SMTP id o10mr36500624pgv.407.1563325142476; Tue, 16 Jul 2019 17:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563325142; cv=none; d=google.com; s=arc-20160816; b=ct8ArcDLldbIFMTd7wR7RgJMaw0Gqvdc0jxpo8GO/iR6lmDfcdc5bCq6u8YaQPhUUQ 4WDUCC9/EGeufn1heFNOEvYFrK6cm+tuQpe0TyPySeeqly0v5dzr3XiSUU2RNNCkh+Fe UCxHSTk0+9SqjsUEQiC2DpuFOXTG4YWnzeCn2apNC+UwY3dW5jiGABSP4bdS54Grk0r8 0oNCHVKtGDR3FrROJC+BfRMYt5Q4JiZQqJeaZLFRF/AGCDAaUYZC9D6q4XqY3wqjuyE1 5dyn8cG90w0kI/P7VUhRMWpx20mNTzRvqA2bqyL6vTftwK4sFYX8E1EGBgPrSZv/l8Ja J3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fVtYvMNueU8HYTUtJBy/4Q0CKlX/45vTmtIUgsF50CY=; b=WeNn6cSxxeQwFOKCrhQ8xVUWUmHOOBugSlj+p/4ip9wwjHNaJ5e109PMVsar1NGBXA /akpzjWqpGqPRbb+tLTzryDpsoOZGTYuRkDsQ1V/CqFj8vg4CwvpYVUqwsN1v9gt7cAl FdC6SVgR+79J/PQiOHqGGXXOwgyQRkMCuQKueAQXOcqqTfwJlDlNrOEI8XDesDf9tJx1 2faPBSmkfOe4o0NsCQiUA4Z2H0ukC1fsi4N7V/K/eyNYogd9YxuFaXd0TFamRgY1fM1q dn8idKpZaTxVFZPFnn0Ld8E77XmfJLx7f89iasmML6l5TDhT4wZh7uvEUc6SJrF9hQdS j9zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=stHDcLu7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si20376823plr.405.2019.07.16.17.58.42; Tue, 16 Jul 2019 17:59:02 -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=@kernel.org header.s=default header.b=stHDcLu7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730590AbfGQA5k (ORCPT + 99 others); Tue, 16 Jul 2019 20:57:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:36316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727956AbfGQA5k (ORCPT ); Tue, 16 Jul 2019 20:57:40 -0400 Received: from devnote2 (115.42.148.210.bf.2iij.net [210.148.42.115]) (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 2C88720818; Wed, 17 Jul 2019 00:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563325059; bh=DqU6d2fKuo9qxkH/mhTsMamm0zYIlWQoFOgjYFyD5gc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=stHDcLu7UD9XoRbmYX3Ve16eIRWrb4LDq8g38+ydo9jKrGC52IkosJYrfBSVjK19n WbRxMJj2qHNSdRCg3rxYqQHzxCry9l/UvJsicYK+0IupJcl34GJTN9ch/Cv7k5TXmA /dNI6SeD08BcTis4HyAcqkkh05HvUZSTD0y2O1Qk= Date: Wed, 17 Jul 2019 09:57:36 +0900 From: Masami Hiramatsu To: Frank Rowand Cc: Steven Rostedt , Rob Herring , Tom Zanussi , Ingo Molnar , Namhyung Kim , Jiri Olsa , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [RFC PATCH 00/11] tracing: of: Boot time tracing using devicetree Message-Id: <20190717095736.c53f0368034a11332346d18e@kernel.org> In-Reply-To: References: <156113387975.28344.16009584175308192243.stgit@devnote2> <20190624115223.db1e53549a15c6548bfa1fa1@kernel.org> <20190625140004.a74443238596b297a558a66f@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frank, On Mon, 15 Jul 2019 06:55:40 -0700 Frank Rowand wrote: > > Hmm, it's a kind of communication with the operator of the boot loader, since there > > is an admin or developer behind it. I think the comminication is to communicate > > with that human. Then if they intend to trace boot process, that is a kind of > > communication. > > The quote from the plumbers 2016 devicetree etherpad ("Operating points are OK ...) > conveniently ignores a sentence just a few lines later: > > "If firmware is deciding the operating point, then it's OK to convey it via DT." > > The operating points example is clearly communicating boot loader information to > the kernel. > > Something the admin or developer wants to communicate is not boot loader > information. But the cmdline (bootargs) is already supported, I think this is a kind of bootargs. > > [...] > >>>>> - Can we use devicetree for configuring kernel dynamically? > >>>> > >>>> No. Sorry. > >>>> > >>>> My understanding of this proposal is that it is intended to better > >>>> support boot time kernel and driver debugging. As an alternate > >>>> implementation, could you compile the ftrace configuration information > >>>> directly into a kernel data structure? It seems like it would not be > >>>> very difficult to populate the data structure data via a few macros. > >>> > >>> No, that is not what I intended. My intention was to trace boot up > >>> process "without recompiling kernel", but with a structured data. > >> > >> That is debugging. Or if you want to be pedantic, a complex performance > >> measurement of the boot process (more than holding a stopwatch in your > >> hand). > > > > Yeah, that's right. > > > >> Recompiling a single object file (containing the ftrace command data) > >> and re-linking the kernel is not a big price in that context). > > > > No, if I can use DT, I can choose one of them while boot up. > > That will be a big difference. > > (Of course for that purpose, I should work on boot loader to support > > DT overlay) > > This is debugging kernel drivers. I do not think that it is a big cost for > a kernel developer to re-link the kernel. On any reasonable modern > development system this should be a matter of seconds, not minutes. Tracing is not only debugging the kernel drivers, but also measures performance or behavior and compare with different settings. Also, in some case, we can not change the binary, like distro kernel. > Compiling a devicetree source is not significantly less time. (To be > fair, you imply that you would have various compiled devicetrees to > choose from at boot time. It may be realistic to have a library of > ftrace commands, or it may be more realistic that someone debugging > a kernel driver will create a unique ftrace command set for the > particular case they are debugging.) Yeah, devicetree build time may not be matter, decoupling from the kernel image is, I think, the key point. Thank you, -- Masami Hiramatsu