Hi again.
The configure option --enable-profile should automatically disable -fomit-frame-pointer. Otherwise gcc will stop because the options -pg and -fomit-frame-pointer are incompatible.
Ciao Sven
P.S. Are there any profiling tools available for use with Gambit besides plain old gprof?
Afficher les réponses par date
At 12:21 Uhr +0100 11.01.2006, Sven.Hartrumpf@FernUni-Hagen.de wrote:
P.S. Are there any profiling tools available for use with Gambit besides plain old gprof?
There's statprof from Guillaume Germain, announced on this list on Jan 24 2005. I'm bundling it with chjmodule ( http://scheme.mine.nu/gambit/chjmodule/ ). As he already says, it's not perfect, it can sometimes be a bit unclear where the time is actually spent when profiling compiled code (for example for recursive calls, or if there are several calculations on one source line - maybe statprof could improve by colouring on a per s-expr basis, but then maybe the collected data isn't good enough, or it's overkill anyway), but it might help.
BTW from what I've read from Brad Lucier's papers, gprof won't help if compiling with single-host, since each module will only show up as one function call in gprof output.
Christian.
On 11-Jan-06, at 9:04 AM, Christian wrote:
At 12:21 Uhr +0100 11.01.2006, Sven.Hartrumpf@FernUni-Hagen.de wrote:
P.S. Are there any profiling tools available for use with Gambit besides plain old gprof?
There's statprof from Guillaume Germain, announced on this list on Jan 24 2005. I'm bundling it with chjmodule ( http://scheme.mine.nu/ gambit/chjmodule/ ). As he already says, it's not perfect, it can sometimes be a bit unclear where the time is actually spent when profiling compiled code (for example for recursive calls, or if there are several calculations on one source line - maybe statprof could improve by colouring on a per s-expr basis, but then maybe the collected data isn't good enough, or it's overkill anyway), but it might help.
BTW from what I've read from Brad Lucier's papers, gprof won't help if compiling with single-host, since each module will only show up as one function call in gprof output.
Christian. _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
Don't forget --track-scheme and gcov:
$ gsc -track-scheme proftest.scm $ gcc -fprofile-arcs -ftest-coverage -D___SINGLE_HOST proftest.c proftest_.c -lgambc $ ./a.out 1346269 1346269 1346269 1346269 1346269 1346269 1346269 1346269 1346269 1346269 $ gcov proftest File 'proftest.c' Lines executed:100.00% of 10 proftest.c:creating 'proftest.c.gcov'
File 'proftest.scm' Lines executed:100.00% of 10 proftest.scm:creating 'proftest.scm.gcov'
$ cat proftest.scm.gcov -: 0:Source:proftest.scm -: 0:Graph:proftest.gcno -: 0:Data:proftest.gcda -: 0:Runs:1 -: 0:Programs:1 -: 1:#! /usr/bin/env gsi-script -:d2 -: 2: 26925371: 3:(define (fib n) 26925370: 4: (if (< n 2) 13462690: 5: 1 26925360: 6: (+ (fib (- n 1)) 13462680: 7: (fib (- n 2))))) -: 8: 2: 9:(define (main) 7: 10: (let loop ((i 0)) 11: 11: (if (< i 10) -: 12: (begin 10: 13: (pp (fib 30)) 15: 14: (loop (+ i 1))))))
Is it possible to check for a symlink without raising an exception, even if the symling is dangling?
I think not, because: - file-exists? cannot be used to check, because it evaluates to #f in case of a dangling symlink. - file-info cannot be used to check, because it raises an exception, if there's nothing.
Here's an example:
(create-symbolic-link "/doesnotexist" "~/dangling") ;; worked, the symlink has been created.
(file-exists? "~/dangling") ;; evaluates to #f.
(create-symbolic-link "/anotherplace" "~/dangling") ;; ERROR: File exists.
(file-info "~/dangling") ;; ERROR: No such file or directory.
(file-info "~/dangling" #f) ;; Ok, informs about the symlink.
(delete-file "~/dangling") (file-info "~/dangling" #f) ;; ERROR: No such file or directory.
I think it would be nice, if file-exists? had also an optional parameter ``CHASE?'' like file-info has.
Regards Thomas
On 11-Jan-06, at 2:16 PM, Thomas Hafner wrote:
Is it possible to check for a symlink without raising an exception, even if the symling is dangling?
I think not, because:
- file-exists? cannot be used to check, because it evaluates to #f in case of a dangling symlink.
- file-info cannot be used to check, because it raises an exception, if there's nothing.
Here's an example:
(create-symbolic-link "/doesnotexist" "~/dangling") ;; worked, the symlink has been created.
(file-exists? "~/dangling") ;; evaluates to #f.
(create-symbolic-link "/anotherplace" "~/dangling") ;; ERROR: File exists.
(file-info "~/dangling") ;; ERROR: No such file or directory.
(file-info "~/dangling" #f) ;; Ok, informs about the symlink.
(delete-file "~/dangling") (file-info "~/dangling" #f) ;; ERROR: No such file or directory.
I think it would be nice, if file-exists? had also an optional parameter ``CHASE?'' like file-info has.
Not impossible because you could catch the exception from file-info. Inconvenient yes, so I have added a chase? optional parameter to file- exists? .
Marc