From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1EC461F44D for ; Thu, 4 Apr 2024 05:50:48 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=Db6Ht3qP; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=M8+m9oK/; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id B2F3483B7D; Thu, 4 Apr 2024 05:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1712209839; bh=smxieNZcUTlTdn7tBbzyvxPNuUMGRmrhupELwp0JLEg=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=Db6Ht3qPHSm3hthj1JX907RZAGrNn323L7+jL8CDfxLDJQowd2xUpN7is79p9eSUT iDe28x6EipZoY9SOujTN0wIaoRRenpI9Yd/i1I+SxTT/91w3BDEL2NqUZapudlrw/o 6RA49e0xrLI3kogTNR9eZR8UZ7f6rHs4nx3yhGX0= Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id C9EE283AD5 for ; Thu, 4 Apr 2024 05:50:35 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=M8+m9oK/; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=ZfqKF4thEYS8EaB9oJ1Eeqsg1pS51mJ72gtNQIgFqGw=; b=M8+m9oK/CuDJd1hYMl/4y6UCgZoa28O+SnLTrKzoVD6ZIom5/oW69ev5O4xkmKygc5WG pswkTj0SODLNein37UzOZpla1yANfXXYdYAzek2H9owfGjnEphaViH6XhpJBQIuqNPA9Eq LR4iUng9g8ICMB4Qie5IUYgWGDtNDY2jP2ClFheWNDP/U1Zvo3jpeKcZJysyqNpwXnZu6+ idXEox3oNAr4IKg9GsFl/CLrAs0Zge/wfULJxk4VASQW0Dc9Y7GNG0V4apE0vSopx+2bsi W1KKDueitmGGagdrW3baXiEysqwt0uTP4UgYz5zLQQP74z4efNb5ca2IW/WMCgWA== Received: by recvd-7fc89fc779-94gxd with SMTP id recvd-7fc89fc779-94gxd-1-660E3FAA-4 2024-04-04 05:50:34.649984878 +0000 UTC m=+1414212.684302827 Received: from herokuapp.com (unknown) by geopod-ismtpd-2 (SG) with ESMTP id _WtaGeg5R_Ooo-F2wQZdWw for ; Thu, 04 Apr 2024 05:50:34.608 +0000 (UTC) Date: Thu, 04 Apr 2024 05:50:34 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20408 X-Redmine-Issue-Author: mk X-Redmine-Issue-Priority: Normal X-Redmine-Sender: mk X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 94035 X-SG-EID: =?us-ascii?Q?u001=2EfAHdK7rjTpei57hOkUqqhnSvnmBlNmyPwXHYElI=2FyiyHyXyxm5Gs6mjaC?= =?us-ascii?Q?jPsSlgT4mBwgXGrASc0SEeGtYpNSCcBVZTEWweu?= =?us-ascii?Q?EJ9qIPnnyuqkEMyW4gEyJxYaVs4dNf+Mv9QqHsm?= =?us-ascii?Q?8nJV0sCNG3neA6GnZHgypAdhOyw9muoQmkzBfwT?= =?us-ascii?Q?2iyv7mLfhQKlnwTvRXitKLpuOpyksETQ1IdaowT?= =?us-ascii?Q?uZa4AnRYmsdR7hZ1uXi=2Fms=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 5VREIZWMOUHK6GD2WI5MNZ3WHDFWYRVU X-Message-ID-Hash: 5VREIZWMOUHK6GD2WI5MNZ3WHDFWYRVU X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117440] [Ruby master Feature#20408] Add heap_live_slots to GC.stat_heap List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: mk via ruby-core Cc: mk Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Issue #20408 has been updated by mk (Matthias K=E4ppler). peterzhu2118 (Peter Zhu) wrote in #note-2: > Thank you for this ticket. I opened a PR that implements this feature: ht= tps://github.com/ruby/ruby/pull/10439 Thank you so much Peter! <3 ---------------------------------------- Feature #20408: Add heap_live_slots to GC.stat_heap https://bugs.ruby-lang.org/issues/20408#change-107819 * Author: mk (Matthias K=E4ppler) * Status: Open ---------------------------------------- `GC.stat` exposes a `heap_live_slots` metric that returns the number of liv= e objects occupying eden slots. Because the slot size was fixed to `RVALUE_SIZE`, this allowed for some bas= ic approximations of how many bytes were live/in-use (`heap_live_slots * RV= ALUE_SIZE`). This could furthermore be "embellished" by adding malloc'ed memory for thos= e objects that were larger than a 40B slot (we track this via a custom CRub= y patch). However, with the addition of Variable Width Allocations (https://bugs.ruby= -lang.org/issues/18239), this does not work anymore because we don't know h= ow `heap_live_slots` distributes over all pools that use different slot siz= es. This could be addressed by also adding `heap_live_slots` (and for symmetry:= `heap_free_slots`) to `GC.stat_heap`. The sum of all live slots per pool s= hould equal `GC.stat[:heap_live_slots]`. --=20 https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-c= ore.ml.ruby-lang.org/