Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp724869ybl; Thu, 23 Jan 2020 06:41:18 -0800 (PST) X-Google-Smtp-Source: APXvYqw9zJCVhS+VL55GER0AJCJVCtLCmn1GUMVQkUhQSZApGGMzbL16SUHeEBq0eWatBL65BMMc X-Received: by 2002:a9d:6c01:: with SMTP id f1mr10951978otq.133.1579790478097; Thu, 23 Jan 2020 06:41:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579790478; cv=none; d=google.com; s=arc-20160816; b=WRUJfJXYo70omOD2putjAeozepnNeZKktqYSCU+1iuvcSNJn5hVntosnEvl+wDvMYt ikUVvff+0aI4dfB8XonEYGPRkuTBM9hptgEJ0Vzl5NW5TZ9BBQBd1SJs8ZnavnCmxKFw DHN1TSzvpQ3wO9pCtk8WENzDzId24EPNZ2TLp/AqMGhvOBAMdcnnn8hG9Hzszt5468kU 0tbHAq4qUCUDW+eYX4imTgyZQtQ7D5PeDpXe8Btppj7uA5nlSwIrISQCtCkbfv/VWN0Q mWzmKF2LEYi466OQj1OlR4WTRrbcG28EsTntSdisO4qz71OaQ5BMddes2NO/pu/6IGJg dUbw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nppDO3Klvkv401Q8hXNVvkXBC/xArfhyTCNbmFgCics=; b=WJhsO5rpH2DUYBdETlIkfHEZOcFQIfyZH6F0qPkLtG2lgSoii4VaiEnGzSkLCHAXQ+ AlFHKBx+MS6Pl543PGnFlIqelK/du+yjr/ArP7GGk8T8HJDFcgjhsocV65ppnzK/yqhW NhH6PJ/12fRQHuS7nRycLhooqkP1V8oiH/6TFaxXc+fubb1vnsAs6r2Cu/IhWmxKPrZw o7kRHmXZ791gDCFU47sKXuU8fhYzoLKy7nKiOB9TUIJa0ej8Tpt4RFW31VgApIFMpV/X G/GA3GMRgEqW18lfEchk9zRWw/NOt10MduSc/ul3cRBOlJS34djLStOJ1aUhOB8qdHn8 hUyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=g1TFgBwc; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l131si874815oig.120.2020.01.23.06.40.52; Thu, 23 Jan 2020 06:41:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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=@google.com header.s=20161025 header.b=g1TFgBwc; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726240AbgAWOin (ORCPT + 99 others); Thu, 23 Jan 2020 09:38:43 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33229 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbgAWOin (ORCPT ); Thu, 23 Jan 2020 09:38:43 -0500 Received: by mail-lf1-f67.google.com with SMTP id n25so2500721lfl.0 for ; Thu, 23 Jan 2020 06:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nppDO3Klvkv401Q8hXNVvkXBC/xArfhyTCNbmFgCics=; b=g1TFgBwcDD7ApzYSZzc0ni8gv2bAvkb8VbX7xDPJXhhDVkdn2Uy8hemQdzIaU7zmQA H8lFVqMG/pkTHmH0vh7+vlqZ6ucnjFftFOpmrmkbGo9WKTaPlM1g5tEwt7HR7iZxgpDn 1+j6OfnaJY8Qg8C0UyKD+azQUrxCBTY/+Le4ViWJbUA+AIInbUwfV3Gm4bKMSWhEhfOe lzp0YiM7o1HpmO7bCJjlTzByrHrDwgTlyr69RrL9yRAVDjS1zw+2tiGOdRy1FH/sY8qr CyUKWtlkMn6X49sSCve6l3lCBpneY+RdxsJCtNgjXIpUYzMRivLwSSUPdkKSQ4FTw4BG HvLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nppDO3Klvkv401Q8hXNVvkXBC/xArfhyTCNbmFgCics=; b=qWw2SIrjM+ykQ1teQEMDpy6P6Xzu4FEQB7kQbRirchgcOWtJ/uAmVnf0wkT6GCrowu iDvHNstqMxQkOMx5IdAQoLVe/cuJNj/dEVuhbmWDj64+x1YKzomIdW1U5Ce26lCzp/fr fltyO0UqIyKH6o4d+GiuBHTtc9L0AIXqCm608RbCDFndnakD76SdKHS6UHNLlxFHDyxv 41UQcsndide43nwgxpazKDACiJiFBhiIMd3o17Ppf3BqsU+Tr4fisPdroGBnXEh9F8vt ScnvEtv9VzrwmAsob863LSzSINtHhRZrY+zYDn2+SDjAzoiMz85361NNcJ/nQcbw5hOs H7Qg== X-Gm-Message-State: APjAAAXRp/6kA2IPhuT+B1tFKWrmCz5qZVaip50QpoeheQQ9Qznw19LA xYTUt/19mdEdxWa+MmqNpx+sBBxwT2DBZjENpn7w5w== X-Received: by 2002:ac2:51de:: with SMTP id u30mr4725453lfm.69.1579790320956; Thu, 23 Jan 2020 06:38:40 -0800 (PST) MIME-Version: 1.0 References: <20200120202708.111383-1-alainm@chromium.org> <6E55772A-01D5-4616-B3DB-CC22B935C855@holtmann.org> In-Reply-To: From: Alain Michaud Date: Thu, 23 Jan 2020 09:38:29 -0500 Message-ID: Subject: Re: [Bluez PATCH] doc: Add definition for Set Kernel Debug Level To: Marcel Holtmann Cc: Johan Hedberg , Alain Michaud , BlueZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Thu, Jan 23, 2020 at 12:52 AM Marcel Holtmann wrot= e: > > Hi Alain, > > > Thanks for your patience. After further research dynamic_debug is not > > available on retail chromium os user systems for a variety of reasons, > > some of which you can find in this trail: > > https://bugs.chromium.org/p/chromium/issues/detail?id=3D188825. > > > > Given we need to be able to diagnose things in the field, this is not > > a good option for this. > > > > I hope this helps explain or justify the need for this interface. > > the reasoning from Kees is 6 years old. Are his issues still valid? > > So I have been looking into pushing bt_{info,warn,err} into the btmon tra= ces. That is why we have bt_dev_* etc. error macro and have changed a lot o= f code to use them. This will hopefully allow us to have errors and warning= s directly in the btmon traces. For bluetoothd errors and warnings this alr= eady works btw. > > I don=E2=80=99t believe that I want to duplicate the dynamic_debug functi= onality and push even more info into dmesg ring buffer that then needs to b= e collected and aligned with btmon traces. The big advantage is if you get = a btmon trace and that has the actual message right in it at the right plac= e with the right timestamp. > > If we push bt_{info,warn,err} into btmon, it might be simpler to do the s= ame for BT_DBG, but it will of course require extra work since our BT_DBG s= tatements are meant to be compiled out if dynamic_debug is disabled. The rational is all still relevant today. To give you some additional background, here's how a version of this is currently used: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/= 1697851 Note that I don't expect us to upstream this as is, in particular, it'd expect we'd also want to forward to pr_debug to support dynamic_debug for systems where it makes sense to use. > > Regards > > Marcel >