From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: tracing and profiling at the repl Date: Mon, 21 Dec 2009 23:18:13 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261433852 18855 80.91.229.12 (21 Dec 2009 22:17:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2009 22:17:32 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 21 23:17:25 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NMqZA-00068K-9w for guile-devel@m.gmane.org; Mon, 21 Dec 2009 23:17:24 +0100 Original-Received: from localhost ([127.0.0.1]:49643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMqZA-0006fO-CR for guile-devel@m.gmane.org; Mon, 21 Dec 2009 17:17:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NMqZ3-0006d5-66 for guile-devel@gnu.org; Mon, 21 Dec 2009 17:17:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NMqYy-0006aq-Kf for guile-devel@gnu.org; Mon, 21 Dec 2009 17:17:16 -0500 Original-Received: from [199.232.76.173] (port=37049 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMqYy-0006al-GB for guile-devel@gnu.org; Mon, 21 Dec 2009 17:17:12 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:57713 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NMqYy-0006KF-92 for guile-devel@gnu.org; Mon, 21 Dec 2009 17:17:12 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 11F1BA8F3A for ; Mon, 21 Dec 2009 17:17:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:mime-version:content-type; s=sasl; bh=c Ze85MuXF+kl6kOdmcBS9sd2Yvw=; b=IFgsvwJqtyXpsx56kUpKuEBNwJ/14Tlyg jeTlIG/0tKg7FLxEvzGOqGimCaiYy4LD7eN5V4qA1dFcxyS0CUYFge4UmkGYg/ZL viiWakbV7xf5uBeJs9CPPE3A7mbjacyYL2eBSABjVUJHpBNV1XNb003ifqn5dHxO K9mct+OFRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=sasl; b=BRh /zHxNXLO69vPqpfnKh5QmEY1l2cVrC6IURToz7szNxtredGn7rbIQqsyHucLke0E brik9j21X5vOMv2kZ354PzRYOxWGwT2eEW5+9IW5DC6ECKG/OLnoejYho/O4nG8R k18c2qK5Vyhv9raW/cwtWeSrYl5S1BHt/YH8vwss= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 0EA8BA8F39 for ; Mon, 21 Dec 2009 17:17:12 -0500 (EST) Original-Received: from unquote (unknown [81.38.191.184]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 34234A8F37 for ; Mon, 21 Dec 2009 17:17:10 -0500 (EST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 961500AC-EE7E-11DE-B2D3-B34DBBB5EC2E-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9785 Archived-At: Hello, wingo@unquote:~/src/guile$ meta/guile Guile Scheme interpreter 0.5 on Guile 1.9.6 Copyright (C) 2001-2008 Free Software Foundation, Inc. Enter `,help' for help. scheme@(guile-user)> (define (fibo x) ... (if (or (= x 1) (= x 2)) ... 1 ... (+ (fibo (- x 1)) ... (fibo (- x 2))))) scheme@(guile-user)> ,tr (fibo 5) # * #:0:1 ()> * fibo 5 ** fibo 4 *** fibo 3 **** fibo 2 **** fibo 1 *** fibo 2 ** fibo 3 *** fibo 2 *** fibo 1 # vm-trace-off! # Sweet, no? We don't have return values here unfortunately, but that could be arranged. Now this too: scheme@(guile-user)> ,pr (fibo 30) % cumulative self time seconds seconds name 100.00 0.29 0.29 fibo 0.00 0.29 0.00 top-repl 0.00 0.29 0.00 call-with-backtrace 0.00 0.29 0.00 # 0.00 0.29 0.00 # 0.00 0.29 0.00 start-repl 0.00 0.29 0.00 # 0.00 0.29 0.00 # --- Sample count: 23 Total time: 0.29 seconds (0 seconds in GC) Unfortunately (make-stack ...) doesn't actually do anything right now, so we see the whole continuation. Also unfortunately we don't see subrs on the stack, like dynamic-wind. But hopefully these problems will be fixed within a couple weeks. Andy -- http://wingolog.org/