Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1591581rwb; Thu, 15 Dec 2022 12:02:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6xey05GX5ZnVoPYCblWJla2acxnU6GBK6cNifDS6WqOR3p6NgGo2WvfZrpze0Zt2EN2fxJ X-Received: by 2002:a62:52d5:0:b0:577:6525:fc98 with SMTP id g204-20020a6252d5000000b005776525fc98mr28760358pfb.3.1671134577781; Thu, 15 Dec 2022 12:02:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671134577; cv=none; d=google.com; s=arc-20160816; b=Jhb/bNOu9+3ez/KhnWnR2t+nR8JdnNrXhqYHiKodQei2jdc8hBpHAyvMdEBggvNgmI MMaisQbJ+Y2vW7H6wsdFkv0YEMpY1Qw6S9aU+lz6LCxqgTBCK7tM3vPuMfTJqfW0n8Lq N3S9yLOikkg8pUiCtr9R2XMFKsO+py28jWpXCxc6VD8tjtdLupEpiiZhG6qXkg4ErYMw xfdXLFRuqhTeUiyouUPvk8rWXygvseNCqgtW0sIhzARbDPZjmPh/XOd3xgpPbGI9HEYd 1SKbW67vzDy7RKf6swQft9XgLzukeDO9dtZG5rMCG2ZmAmfXRMJ6BletzX6ckAE8I5id YQ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7WnaZc2bs26QE2S1hFU0wWVtk2SkMXSSpzkb6FSS1RI=; b=cQQ+SsBxctRDPHa6m9fteez8SGRXxgCr2CWwGkC4PUXiCeOrv9Soq1ke1iUBcXIYYx /zM5Kof4CbuNE0CNNGyLaHnGE3QHMVfRsqk2ijs/j9ZrRw8GAhCL2DmORS+ZyKAWF0SA gL9IDhCBkgh5p55U3FYABslyNOIXf73gzNqCuCSdydZWO6tTPWKlNjxXJsLPL8mgX9d0 xKv1W2ZlsxIxBvqFY2ZbXatX4oXMjE71Tr+z6ue+wtBAmN71TsGdnllMmDkf2OZ/evXy 30Zbnydc4BVgYkNSLwCZefdXg8TfOfHsdThlCdVvUndGXXpsBU7nduSky5OUuaN1etkx N9hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=aGblDN6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020aa79529000000b00576950b449asi3508406pfp.351.2022.12.15.12.02.48; Thu, 15 Dec 2022 12:02:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=aGblDN6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbiLOTxG (ORCPT + 69 others); Thu, 15 Dec 2022 14:53:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiLOTxE (ORCPT ); Thu, 15 Dec 2022 14:53:04 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C9D537E4 for ; Thu, 15 Dec 2022 11:53:01 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id f20so75722lja.4 for ; Thu, 15 Dec 2022 11:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7WnaZc2bs26QE2S1hFU0wWVtk2SkMXSSpzkb6FSS1RI=; b=aGblDN6+LiroAi5Ce2HI0sla+sv/MZ0o1VnWUgJkTxIOUl93xZYtZDnsd8zl1DABm2 OfhiFJBPHg9RSV8cw+9sGyvjAUzHb9igov4etIG+PT6jB8if72VmeESBXHF3IHsiLc5M b2CmaXYJsYqhGPOOzKvG2srf3DxtCyWSKXn2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7WnaZc2bs26QE2S1hFU0wWVtk2SkMXSSpzkb6FSS1RI=; b=L3pOJjBuhqPh8Gy2hg2Bpqj6+4xWdx1V5WnvD1w5gFIsoF/KKl8Bvd1xkNZ9KlAPLA RgACEXYKfbuaxrL3bxScKRHn+cLbPmeHWrDXNgi3EPh2N1RboQWT1oGSpMmKoop/UzSm yMUPTe5PGkGSGhtNh/7unO69qqVb+sPhjbHV93iiwdNk3KylraANWyJWLYsC0/5vor+7 ihpONcV6i8qxwkgOjVyXzfqcX0E9DvgFVBLZtqJesqUZJb0Gvq37jqKEdz7VhDjZfChs DbCFVdK1UGY7BxJnLcst09Zs1q6vixdE9rf+ECw1Chpsg5/hSBMfsyeSGjAHCbxustbn j2KQ== X-Gm-Message-State: ANoB5pkF6CqCpKpUr3CZcvu73l+3SLtUw5RzQwTnguzOuuBhGNN0rhde Nx/k7SLB/bktZ8gLBpkXZrvwcYwgx6fYt8oiJhWr5Q== X-Received: by 2002:a05:651c:124c:b0:279:f45e:ccd6 with SMTP id h12-20020a05651c124c00b00279f45eccd6mr7839328ljh.483.1671133979884; Thu, 15 Dec 2022 11:52:59 -0800 (PST) MIME-Version: 1.0 References: <20221214233106.69b2c01b@gandalf.local.home> <20221215141146.6ceb7cf2@gandalf.local.home> In-Reply-To: <20221215141146.6ceb7cf2@gandalf.local.home> From: Joel Fernandes Date: Thu, 15 Dec 2022 14:52:48 -0500 Message-ID: Subject: Re: [RFC][PATCH] ACPI: tracing: Have ACPI debug go to tracing ring buffer To: Steven Rostedt Cc: LKML , Linux Trace Kernel , linux-acpi@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Masami Hiramatsu , Brian Norris , Ross Zwisler , Ching-lin Yu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2022 at 2:11 PM Steven Rostedt wrote: > > On Thu, 15 Dec 2022 18:45:37 +0000 > Joel Fernandes wrote: > > > Wouldn't it be better to also check trace_acpi_print_enabled() here in the > > else if() condition, along with IS_ENABLED()? That way if the CONFIG is > > enabled but the tracepoint is not enabled, at least the messages will go to > > dmesg instead of skipped. > > I really don't want that. This was purposely done to be mutually exclusive. > The reason I added this in the first place, is because too much enabled > will render the system useless if printk() is used. > > After boot up, if I had enabled all debug events and then I were to disable > the acpi tracepoint, it will likely render the system useless again if it > were to switch over to printk. Ok, sure. I see where you were going. So you want no debugging messages at all if the trace event is disabled. That's fine with me. I would also add a note about the need to enable the specific trace event, in the Kconfig message and/or the Documentation. Otherwise, you might get someone say, "hey I enabled the CONFIG option but I see nothing in the trace buffer". Another approach could be to always enable the trace event by default, if the CONFIG is turned on. Or do a printk() telling the user about the event to enable, so they know why their trace buffer is empty. Up to you and the ACPI maintainers. ;-) thanks, - Joel