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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBDBDC433EF for ; Sun, 14 Nov 2021 03:22:26 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D1623603E9 for ; Sun, 14 Nov 2021 03:22:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D1623603E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 466B88349D; Sun, 14 Nov 2021 04:22:23 +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="D9aryvqk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87E4683389; Sun, 14 Nov 2021 04:22:20 +0100 (CET) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (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 3E30383459 for ; Sun, 14 Nov 2021 04:22:15 +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-x22c.google.com with SMTP id q25so21091410oiw.0 for ; Sat, 13 Nov 2021 19:22:15 -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=Phdyq/K+iNFFVRAgTw8mKjqfgRamwo4DDYOS5TB40XI=; b=D9aryvqkfAFRm9O0c2RK74lfl8lL4uOUvGsY0+ArSoABz6jWVmLWEQmhyxDRGd+Fyq NrEJ9TbS1Mx0Zih33mhWj4tPhbFw1WQI3DB6HE4u7elbsxDAv8Mf8OmLoBRke/swbUnK awUIKL20VeoW1alRxEWsyd7Dk/vATydOBruFA= 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=Phdyq/K+iNFFVRAgTw8mKjqfgRamwo4DDYOS5TB40XI=; b=5PU+zwtvLj6gnhRK6twOMO46qK1v7kODg54jj9HAuV/WvLsQgGY/k6I0qDCZ6oVehn 5boM5ABqWQEfQeFyCfPl9JCDT9qPkODc+rFj1vulTkyns767QS4Pf0SOF6nldXdl7g9z At/IREi5wIYmS4Uwk6mEbSmrPLb2d8c5OBRFfcOlxCadHozY0ZL3KJycrvXW3n2PwCNT 1Jj3kOuppas/klyPXPS79gncOR0U/dJXq3VUD07lPsmoq3wegJ/fSpnS9TTuR4EA/MyC CAnmvWVDYYexZRq2m/vkOPGAEmAdws6pEYgVclO47Ubz+MMzFDi/ymW3QxCriKchGIMI H9Eg== X-Gm-Message-State: AOAM5302huL13C7+C1cEKVTOKDQ59ZR2RZtFhZSJu7bx3ijgIpgGaA0O 0nkSEWtUBKVlijgxMFlIZLzCPu3LF1VMVA== X-Google-Smtp-Source: ABdhPJzuffM3uPQxiVD3seo7bb90tqJvSD52ulSPGZoQ9ouBUD9wJ0sZ1irWLeMUDfQV4GSjbYx0IQ== X-Received: by 2002:aca:d608:: with SMTP id n8mr23957550oig.89.1636860133632; Sat, 13 Nov 2021 19:22:13 -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 o2sm2147004otl.34.2021.11.13.19.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 19:22:13 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Aswath Govindraju , Aymen Sghaier , Bin Meng , Heinrich Schuchardt , Kory Maincent , Michal Simek , Patrick Delaunay , Peng Fan Subject: [PATCH 01/10] trace: sandbox: Use only the Kconfig options Date: Sat, 13 Nov 2021 20:21:52 -0700 Message-Id: <20211114032201.493122-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc1.387.gb447b232ab-goog In-Reply-To: <20211114032201.493122-1-sjg@chromium.org> References: <20211114032201.493122-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 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 --- cmd/Kconfig | 2 ++ doc/develop/trace.rst | 14 +++++++------- 2 files changed, 9 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..34bce5d4677 100644 --- a/doc/develop/trace.rst +++ b/doc/develop/trace.rst @@ -30,16 +30,16 @@ 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 (if not already there) .. 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 + CONFIG_TRACE_BUFFER_SIZE=0x01000000 + CONFIG_TRACE_BUFFER_SIZE=0x01000000 + CONFIG_TRACE_EARLY_SIZE=0x800000 + CONFIG_TRACE_EARLY=y + CONFIG_TRACE_EARLY_ADDR=0x00100000 Build sandbox U-Boot with tracing enabled: -- 2.34.0.rc1.387.gb447b232ab-goog