From patchwork Mon May 16 08:43:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 54018 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4AAB6385780C for ; Mon, 16 May 2022 09:03:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AAB6385780C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652691819; bh=u5jjKs1SWjKt7vcK0yUQ4OPWMha+AL2Xrie5q6EsFjQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=HbFO5NSQEnxEiPcZaMH1Vp/EQ9fF2f8wU2JKqMpNfDFDNxLgelpvDqC1QAOMrOFpw g7BMGbPRATTLJ1Oz/5n3LXcvtHwnLxSBiZ7MCOHNlrKl2NXpnpALF+Lx5cydofPOA5 Ia3Ko8Fvq+YQlAOjTrLz/JlFXRV+GgEzyAJ6IWPA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id AE6123858C56 for ; Mon, 16 May 2022 08:43:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AE6123858C56 Received: by mail-wr1-x42c.google.com with SMTP id g17so1329010wrb.11 for ; Mon, 16 May 2022 01:43:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=u5jjKs1SWjKt7vcK0yUQ4OPWMha+AL2Xrie5q6EsFjQ=; b=r4jzxFO3tKNUGZYZgZhvejOXmVyoYt2WHGH3PHjzUsz0rzo1UN6sF7UlRAPp4n2xnj rFJ9sXBTZc6A4RQv4zfmQRS1yYrF2fdq8n3ssk4CbSCVWl9uoQ/Z8qcSTXdPwctSrAIe LMYF2AZO6nDlWY112synNTvzXUDCSDViFT6cmkp5h5MipMuY6GMqwcDfAMVLAofd70IU gd2cCzm2JXgnMS0rKI5+6wSFK7Pjl/9d+p4KmbfcBokWrzxtGQeI+kABBr2AzjxE79aO nwk/2Bh2Xs8i44HblBvUmKzlMkLKYKjTMyeqcDLkHucey4ks4VGLV/i7EnhVR2XPM8rH snWA== X-Gm-Message-State: AOAM530clOuIiOcfeMUCWW4P0V8G7hpQiFtzHcF/KArZG/7Ab6pMEhZx FDqmAVgrOZ3JIYRxbNBxNd4XA/5XV3ItyQ== X-Google-Smtp-Source: ABdhPJxU09FX7a5sy6AChD/aOZXxpVOLFIcUS+b3g8y5mbDJLcF5r/D6wA7hAhAArw5l0DTqeqAH1w== X-Received: by 2002:adf:f049:0:b0:20d:a8d:b1e3 with SMTP id t9-20020adff049000000b0020d0a8db1e3mr2226243wro.241.1652690596577; Mon, 16 May 2022 01:43:16 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id w6-20020adf8bc6000000b0020c5253d8besm9241400wra.10.2022.05.16.01.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 01:43:16 -0700 (PDT) Date: Mon, 16 May 2022 08:43:15 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] GNAT.Debug_Pools: Improve documentation of the Stack_Trace_Depth parameter Message-ID: <20220516084315.GA3843724@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Joel Brobecker Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Setting this parameter to zero when calling the Configure procedure has the effect of disabling completely the tracking of the biggest memory users, which wasn't clear from the current documentation. So this patch enhances the documentation of both the Configure procedure as well as the Dump procedure to make that explicit. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-debpoo.ads: Improve documentation of the Stack_Trace_Depth parameter. diff --git a/gcc/ada/libgnat/g-debpoo.ads b/gcc/ada/libgnat/g-debpoo.ads --- a/gcc/ada/libgnat/g-debpoo.ads +++ b/gcc/ada/libgnat/g-debpoo.ads @@ -123,7 +123,8 @@ package GNAT.Debug_Pools is -- traces that are output to indicate locations of actions for error -- conditions such as bad allocations. If set to zero, the debug pool -- will not try to compute backtraces. This is more efficient but gives - -- less information on problem locations + -- less information on problem locations (and in particular, this + -- disables the tracking of the biggest users of memory). -- -- Maximum_Logically_Freed_Memory: maximum amount of memory (bytes) -- that should be kept before starting to physically deallocate some. @@ -275,8 +276,12 @@ package GNAT.Debug_Pools is Size : Positive; Report : Report_Type := All_Reports); -- Dump information about memory usage. - -- Size is the number of the biggest memory users we want to show. Report - -- indicates which sorting order is used in the report. + -- Size is the number of the biggest memory users we want to show + -- (requires that the Debug_Pool has been configured with Stack_Trace_Depth + -- greater than zero). Also, for efficiency reasons, tracebacks with + -- a memory allocation below 1_000 bytes are not shown in the "biggest + -- memory users" part of the report. + -- Report indicates which sorting order is used in the report. procedure Dump_Stdout (Pool : Debug_Pool;