guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] branch master updated: statprof: Ensure 'call-thunk' is


From: Ludovic Courtès
Subject: [Guile-commits] branch master updated: statprof: Ensure 'call-thunk' is not inlined.
Date: Thu, 23 Jan 2020 15:48:06 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guile.

The following commit(s) were added to refs/heads/master by this push:
     new bf1f542  statprof: Ensure 'call-thunk' is not inlined.
bf1f542 is described below

commit bf1f5422bdb364667d6761dd73454558d6dbf895
Author: Ludovic Courtès <address@hidden>
AuthorDate: Thu Jan 23 21:46:28 2020 +0100

    statprof: Ensure 'call-thunk' is not inlined.
    
    Previously, 'make-stack' calls with the inner and outer cuts arguments
    would always return #f because 'call-thunk' wouldn't appear on the
    stack.
    
    * module/statprof.scm <top level>: Add self-assignment to 'call-thunk'.
---
 module/statprof.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/module/statprof.scm b/module/statprof.scm
index a1e0efb..33eac44 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -1,7 +1,7 @@
 ;;;; (statprof) -- a statistical profiler for Guile
 ;;;; -*-scheme-*-
 ;;;;
-;;;;   Copyright (C) 2009, 2010, 2011, 2013-2018  Free Software Foundation, 
Inc.
+;;;;   Copyright (C) 2009, 2010, 2011, 2013-2018, 2020  Free Software 
Foundation, Inc.
 ;;;;    Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com>
 ;;;;    Copyright (C) 2001 Rob Browning <rlb at defaultvalue dot org>
 ;;;; 
@@ -828,6 +828,10 @@ The return value is a list of nodes, each of which is of 
the type:
     (lambda results
       (apply values results))))
 
+;; Prevent inlining of 'call-thunk' so that it can be used to determine
+;; the stack boundaries passed to 'make-stack'.
+(set! call-thunk call-thunk)
+
 (define* (statprof thunk #:key (loop 1) (hz 100) (count-calls? #f)
                    (port (current-output-port)) full-stacks?
                    (display-style 'flat))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]