From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39361: continuation and gc performance Date: Sat, 21 Mar 2020 18:33:41 +0100 Message-ID: <878sjtzk7e.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74152"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39361@debbugs.gnu.org To: Stefan Israelsson Tampe Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Mar 21 18:34:12 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFi0h-000JBd-FT for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 18:34:11 +0100 Original-Received: from localhost ([::1]:39318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFi0g-0007FH-0X for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 13:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56189) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFi0Z-0007Ez-JM for bug-guile@gnu.org; Sat, 21 Mar 2020 13:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFi0Y-0004VI-Mp for bug-guile@gnu.org; Sat, 21 Mar 2020 13:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFi0Y-0004VC-Jj for bug-guile@gnu.org; Sat, 21 Mar 2020 13:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFi0Y-00006x-GY for bug-guile@gnu.org; Sat, 21 Mar 2020 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 21 Mar 2020 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39361 X-GNU-PR-Package: guile Original-Received: via spool by 39361-submit@debbugs.gnu.org id=B39361.1584812029404 (code B ref 39361); Sat, 21 Mar 2020 17:34:02 +0000 Original-Received: (at 39361) by debbugs.gnu.org; 21 Mar 2020 17:33:49 +0000 Original-Received: from localhost ([127.0.0.1]:47938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFi0K-00006S-TF for submit@debbugs.gnu.org; Sat, 21 Mar 2020 13:33:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFi0J-00006F-Rb for 39361@debbugs.gnu.org; Sat, 21 Mar 2020 13:33:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFi0E-0004MO-NS; Sat, 21 Mar 2020 13:33:42 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56122 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFi0E-0003cK-9K; Sat, 21 Mar 2020 13:33:42 -0400 In-Reply-To: (Stefan Israelsson Tampe's message of "Thu, 30 Jan 2020 22:10:50 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9666 Archived-At: Hi Stefan, Stefan Israelsson Tampe skribis: > I think I found a gc leak in guile 3.0 > > Isn't it so that so the continuation keep a copy of the stack. The issue = is > that in the stack a raw integer or float may be present and so the gc > properties is less then ideal as those may be interpreted as pointers by > the GC and lead to parts of the heap being kept from garnage collecting. > > The information about a slot being a raw value or a scm value is > available as we do the correct gc updating of the stack inside guile 3.0. > May I propose that we add a bitvector to the continuation that indicate > that if a lslot is raw or not. Then add a pass that collect the rawness > information in the creation of the closure. Finally a custom made mark > procedure for closures can be made that uses all this information to make > sure to mark only scm slots in the stored continuation therby improving gc > perfromance. I believe what you describe is already what happens in =E2=80=98scm_i_vm_mark_stack=E2=80=99. Or am I missing something? Thanks, Ludo=E2=80=99.