From patchwork Mon May 3 02:55:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1473001 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=MejmsKi0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FYSJn0wdZz9rx6 for ; Mon, 3 May 2021 12:55:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ACE878092A; Mon, 3 May 2021 04:55:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MejmsKi0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19C188092A; Mon, 3 May 2021 04:55:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 1F5598092A for ; Mon, 3 May 2021 04:55:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x736.google.com with SMTP id 197so3531145qkl.12 for ; Sun, 02 May 2021 19:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qF3d+ouXnpD5EWaLStuigHE+HQ/9ZbElkHzTYyHP2Pg=; b=MejmsKi0RVta6zOk0e5JAJTlq5aXbjGx9BBzGL0AkT6NwCRVBgdj1y/0FWEofpOPh4 eQuUDcDlZeHPgnCMl73MJ3U/kAw6jM1oMYjJtovaJJDNZNIJuRrNNovhL/oRgihfywws 1cp59KnikKISiPV/6GBH1gcSUWDFFfvy95Rv9HERRRxEl7fsUKaAWcRAdKTD/XthAgmc 0l1d4p0/Xx9vGkql8Fxa2aeLSpAx62j28GrTiGvOBKPRzDsEoTAlc0O0OBP05xouPGXJ /qJ8Zvyuu6tOrx7vjva+wJagkXuu/Ori43BifShPQIlMRdEM5JlapG+Dw1X6VN3l7cj/ 2rxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qF3d+ouXnpD5EWaLStuigHE+HQ/9ZbElkHzTYyHP2Pg=; b=UBKRUFTBpcaLtQIeW4u6uu6L2x5gEnYa+lN3jWfgA5mIe6a5oOJF7b4HWkjBoYc7VB w10MUkJPHlwe3oa97XBW7zR3Os8wd8nDybr2QNbPFL3PKMeA1SMoR2prQdAfwFqxr/WJ ux8gD9GAoV/a56Ggyv2VV2iocWww3hQFhG963CJ1+iSbLOqf1mc9/dY+LHpucaiwveEQ BFWexZqhS1SmrHN0bIxb7KeI9ZffVrmLWaM5BpAMBBGasInfmC1MPGZOb0Imov3boW5x uJFR2ReiVPJ6mF8rh+nqarrdKLEErsRpUBOrh//zlyxPtQ3gUwIpkd8YQZkLECExrM5o nELg== X-Gm-Message-State: AOAM531wkvmapAz9oVuCKwhafnDnj7zt7DG4EzYHJPgXjrYsp2mGcxkh ylht/CBe8sLUd00hxe+yZvTs0sQGwfk= X-Google-Smtp-Source: ABdhPJwKl6Vcj6/E5pLIwWjGoc0BbHYxCAWuOYfm9KBLj4QBRrTxMOr3TI2KtkFxhRVXBUniNqASnw== X-Received: by 2002:a37:9644:: with SMTP id y65mr17518478qkd.494.1620010520595; Sun, 02 May 2021 19:55:20 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id s75sm7536059qke.126.2021.05.02.19.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 19:55:20 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de, Tom Rini Cc: Heinrich Schuchardt , Simon Glass , Sean Anderson , Anastasiia Lukianenko , Ovidiu Panait , Peng Fan , Philipp Tomsich , Reuben Dowle Subject: [PATCH 0/4] malloc: Enable profiling dlmalloc with valgrind Date: Sun, 2 May 2021 22:55:12 -0400 Message-Id: <20210503025516.1931890-1-seanga2@gmail.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean This series adds support for running valgrind against U-Boot's internal malloc. This allows for much more useful reports to be generated. Sean Anderson (4): Add valgrind headers to U-Boot malloc: Annotate allocator for valgrind doc: sandbox: Document how to run sandbox with valgrind malloc: Fix sbrk clearing memory after freeing it instead of before Kconfig | 14 + Licenses/README | 1 + Licenses/bzip2-1.0.6.txt | 30 + common/dlmalloc.c | 39 +- common/malloc_simple.c | 10 + doc/arch/sandbox.rst | 14 +- include/malloc.h | 4 + include/valgrind/memcheck.h | 251 ++ include/valgrind/valgrind.h | 7106 +++++++++++++++++++++++++++++++++++ scripts/u-boot.supp | 30 + 10 files changed, 7490 insertions(+), 9 deletions(-) create mode 100644 Licenses/bzip2-1.0.6.txt create mode 100644 include/valgrind/memcheck.h create mode 100644 include/valgrind/valgrind.h create mode 100644 scripts/u-boot.supp