Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C146C433F5 for ; Wed, 24 Nov 2021 16:27:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2073E83738; Wed, 24 Nov 2021 17:27:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="StH65v//"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A512E82FB3; Wed, 24 Nov 2021 17:27:10 +0100 (CET) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 61109812C3 for ; Wed, 24 Nov 2021 17:27:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22f.google.com with SMTP id bj13so6413721oib.4 for ; Wed, 24 Nov 2021 08:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ouxArv1EqPYDf5RqZkS/4avea7kV3Kt5nN0YhdJrXdQ=; b=StH65v//rpO7aCOB7tYTtgD4beISP/3b68MU4gX4VWpFeep4zT1aGh5JY7LrnL66mi pKXxW/PUH4RLlI+BqkNBlJRgQs5uwtfSmLi0O62C843OMj4LrrU7PEk3g4E9YtUcZetJ fWi1HkcpObcMZg2oEA/2dH1clOmJbdj2rqT74= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ouxArv1EqPYDf5RqZkS/4avea7kV3Kt5nN0YhdJrXdQ=; b=AELuqBmTEeAj3uGSfeOktYxdggohlcMWEov8SGXvkk9UsO3Yc+JjRygXLFbbviswqp OkrSJj1TpQhvxqgHMXKrec5rZVmmMBN1RYdIKCrK2cQZ/G7NJiZuL/Mw0vm5mIEd08/e uM1TFlZomMjXQ82hWKXKqovPNIdQ5UEA9eiJhuT+KNUInIfZ0OO/D0CMZgDMClmVttV+ pBwrVxfAwAo30THd57xBEJaUN3DlR2TEa8sF+XSGiOfRLA7lRnC9Q5gFLq+z6SjB9Rj3 OvS4PNB7dLw9visCDHCbIdlfo0sUnwkObqtjYsgLDEXy1SbxPZ0XHmNBOXPtQRC57BYm NfRg== X-Gm-Message-State: AOAM533R9WydVtQBheFp94TeFpklQXgclWGfLJevWkaC3VeogltEqEhA yEmTX9CbjRI1kcr0dySMutqsrsJhoJbgGg== X-Google-Smtp-Source: ABdhPJy9Jqhz+GeYuZHgwAl0z++b8qrmx1mrSchRlzDZe56zO4xDHHJt0KRLA8+kNGzerCJ/f48ldw== X-Received: by 2002:a54:4482:: with SMTP id v2mr7414724oiv.61.1637771221662; Wed, 24 Nov 2021 08:27:01 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id w10sm43068ott.46.2021.11.24.08.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 08:27:01 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass , Aswath Govindraju , Aymen Sghaier , Bin Meng , Franck LENORMAND , Kory Maincent , Michal Simek , Patrick Delaunay , Peng Fan , Priyanka Jain Subject: [PATCH v2 01/11] trace: sandbox: Use only the Kconfig options Date: Wed, 24 Nov 2021 09:26:39 -0700 Message-Id: <20211124162649.846156-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211124162649.846156-1-sjg@chromium.org> References: <20211124162649.846156-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean At present there are Kconfig options for tracing, but sandbox uses plain #defines to set them. Correct this and make the tracing command default to enabled so that this is not needed. Signed-off-by: Simon Glass --- Changes in v2: - Drop the unnecessary defconfig changes from the docs cmd/Kconfig | 2 ++ doc/develop/trace.rst | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 5b30b13e438..fd8f0227c89 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2350,6 +2350,8 @@ config CMD_LOG config CMD_TRACE bool "trace - Support tracing of function calls and timing" + depends on TRACE + default y help Enables a command to control using of function tracing within U-Boot. This allows recording of call traces including timing diff --git a/doc/develop/trace.rst b/doc/develop/trace.rst index 7776c484286..843bc1f18ad 100644 --- a/doc/develop/trace.rst +++ b/doc/develop/trace.rst @@ -30,16 +30,11 @@ Sandbox is a build of U-Boot that can run under Linux so it is a convenient way of trying out tracing before you use it on your actual board. To do this, follow these steps: -Add the following to include/configs/sandbox.h (if not already there) +Add the following to config/sandbox_defconfig .. code-block:: c - #define CONFIG_TRACE - #define CONFIG_CMD_TRACE - #define CONFIG_TRACE_BUFFER_SIZE (16 << 20) - #define CONFIG_TRACE_EARLY_SIZE (8 << 20) - #define CONFIG_TRACE_EARLY - #define CONFIG_TRACE_EARLY_ADDR 0x00100000 + CONFIG_TRACE=y Build sandbox U-Boot with tracing enabled: -- 2.34.0.rc2.393.gf8c9666880-goog