Received: by 10.223.176.46 with SMTP id f43csp2816474wra; Thu, 25 Jan 2018 15:55:57 -0800 (PST) X-Google-Smtp-Source: AH8x226wtLc4oIa00sIU1CwL38nuTgFjrfn5Pj5PAtpYoFwK7shh6zN8iw3cL2IPSC2L4j2oGXyr X-Received: by 10.99.115.94 with SMTP id d30mr5175192pgn.172.1516924557633; Thu, 25 Jan 2018 15:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516924557; cv=none; d=google.com; s=arc-20160816; b=bbHqwU1b3HKe3kuQ3SPUxX4qr1UlNGfBE16lATSFVBQneD5gBcwyHiyleR4OdMjh+z gfNZEdMd25yUEV8c6KGtctaDsZ+zrXjj/Ioxsr+1APN8cvylUHgeQSx6qG+zG9XBL/1f e5w9SWZqhNyJdG103R8/vB1tdOTnt/L6dAo8bQhS6H1V/dmOcOYi4DJRAPXQnIS5TBMh CVrC+ShtV9UpKirLAYv4R2EzXzFuTCA0EXdCmv1OrtGd7bgbTPGrSHhtPZ3IunXJJ001 4H4j7nth6zTdO2l/4tbez1t2SXb5vNzQlt4e3ioUSmtJhEaEbVCDvO9ZHoxrf5nCKu3v ohow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=CO7IMmBbs9ZTqMPKHzyuz29Y6BneVNvCa9Mc3ROWEJo=; b=R+UzgHCe4j4mHRNP7kljJLv9Zl4+2wcO+GFKhzmuZb/hDmDoZA2QZd/3K9dRF8EdO6 HbQRj9QB8DSg67jdwH4ZQlVGOOpBw3Uanwp/aVUODKrr75j8A50QyiNpeLqmSomAzM7Q AambLQT8UKCXYd7RavrWOsWz0HVVgN2Ah7dNnhJeBS3ZZOKGHYhxYtSYSJKnDJ5Xmk5S d1sWFHy7fZ/HjpoMlU8yCN5D2XQzcggMBrN8xHKGbqh+Rr2oLV4PVsiW++RV8+/Evo61 Z/IWI3IXSvtubg9QFlntiBgqovEZj1Ivtc9LWJCiXiCzAQ7dQYql7Davu60MxjklnSY3 C65g== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si2188865pgq.440.2018.01.25.15.55.43; Thu, 25 Jan 2018 15:55:57 -0800 (PST) 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860AbeAYXy1 (ORCPT + 99 others); Thu, 25 Jan 2018 18:54:27 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49690 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751777AbeAYXyK (ORCPT ); Thu, 25 Jan 2018 18:54:10 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0PNs98i086344 for ; Thu, 25 Jan 2018 18:54:10 -0500 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fqr67t55x-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 25 Jan 2018 18:54:09 -0500 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Jan 2018 16:54:05 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 25 Jan 2018 16:54:01 -0700 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0PNs1UU11338092; Thu, 25 Jan 2018 16:54:01 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C5C56E03A; Thu, 25 Jan 2018 16:54:01 -0700 (MST) Received: from oc6857751186.ibm.com (unknown [9.80.194.116]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 70E966E035; Thu, 25 Jan 2018 16:53:59 -0700 (MST) Subject: Re: [RFC PATCH v2 0/1] of: easier debugging for node life cycle issues To: Frank Rowand , Wolfram Sang Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , linux-renesas-soc@vger.kernel.org, Rob Herring , Geert Uytterhoeven , linuxppc-dev@lists.ozlabs.org References: <20180121143117.19805-1-wsa+renesas@sang-engineering.com> <00fc90ee-de26-f819-9c81-27d06918564d@gmail.com> <20180125060330.781667e9@vmware.local.home> From: Tyrel Datwyler Date: Thu, 25 Jan 2018 15:53:58 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18012523-8235-0000-0000-00000CECDAF2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008428; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00980363; UDB=6.00496977; IPR=6.00759665; BA=6.00005795; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019214; XFM=3.00000015; UTC=2018-01-25 23:54:04 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012523-8236-0000-0000-00003F685437 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-25_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801250310 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/2018 01:49 PM, Frank Rowand wrote: > Hi Wolfram, > > On 01/25/18 03:03, Steven Rostedt wrote: >> On Wed, 24 Jan 2018 22:55:13 -0800 >> Frank Rowand wrote: >> >>> Hi Steve, >> >>> >>> Off the top of your head, can you tell me know early in the boot >>> process a trace_event can be called and successfully provide the >>> data to someone trying to debug early boot issues? >> >> The trace events are enabled by early_initcall(). > > < snip > > > This means that ftrace can not be used for the of_node_get(), > of_node_put(), and of_node_release() debug info, because > these functions are called before early_initcall(). Please > use pr_debug() for these functions. I would argue that early boot debugging doesn't completely negate the usefulness of this tracing infrastructure. I get that no information is available in the trace up until ftrace is setup by its early_initcall, but I still found issues after early boot using this patch and I would hope that it would be somewhat obvious if references are out of whack once the ftrace data becomes available. In the dynamic case on Power we often do reconfig well after boot on live systems which produces a lot of reference put/gets. This patch made it easy to identify several reference leaks and underflows in our attach and detach logic with the added aid of being able to turn on the stacktrace for each call in the ftrace data. Another thought is it would be nice if we could have the best of both worlds such that the tracepoints were pr_debugs up until the ftrace early_initcall. Or, I suppose we could ifdef it and make the ftrace tracepoints a configuration option, such that if it wasn't configured we implement the tracepoint functions as pr_debugs. This makes early boot an option. Just spit balling ideas. -Tyrel > > As far as I know, the of_reconfig_notify() could remain an > ftrace instrumented function. But now that the only thing > that would be ftrace instrumented is of_reconfig_notify(), > I don't see a strong justification for changing the existing > pr_debug() calls to an ftrace alternative. Though I suspect > the original author of the patch still might desire to have > the "#ifdef DEBUG" surrounding the pr_debug() calls removed > since one of his issues was having to recompile his kernel > to do his debugging. > > -Frank >