caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: "Yaron Minsky" <yminsky@cs.cornell.edu>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] native mode backtrace patch for 3.06
Date: Sun, 28 Sep 2003 09:39:32 -0700	[thread overview]
Message-ID: <4.3.2.7.2.20030928092301.028387b8@localhost> (raw)
In-Reply-To: <64571.209.54.74.251.1064749973.squirrel@minsky-primus.home ip.net>


At 07:52 9/28/2003 -0400, Yaron Minsky wrote:
>Does the patch have any performance implications?

The instrumentation code it adds (to every function, even small ones, although that could be changed relatively easily by adding some kind of function-length metric, maybe what the inliner uses) will take some time, but in the brief test I did it didn't make much difference in my game, which was a pleasant surprise (even when it was added to tiny things like a 2D vector addition that's used everywhere).  Maybe inlining happens before cmmgen or something, I don't know.

>Another thought: it
>might be nice to get it to dump the failure into something analogous to a
>core dump file, so that it wouldn't confuse an ordinary user, but it would
>save the backtrace which could be recovered for debugging purposes.

That would be easy, since the printout is in C and just fprintfs to stderr.  I should also add a caml interface to it in Sys or something, that just returns the data, so you can put a try ... with _ -> Sys.get_debug_native_backtrace () around your whole program (or in an atexit) and do whatever you want with it.

>Anyway, please do send me the patch.  Though I hope eventually this patch
>or one like it ends up in the standard distribution.

A couple others have asked for it, so I'll clean it up and post it on my website.  I'll send mail to the list when I do that.

At 03:04 9/28/2003 +0400, malc wrote:
>http://groups.google.com/groups?q=fourth+shared+patch&hl=en&lr=&ie=UTF-8&selm=fa.gbof7hv.fmmo03%40ifi.uio.no&rnum=1
>Cross platform support for this was done, nearly one year ago..
>(Link is dead, but im not)

Ah, I probably should have searched, but it sounds like yours is not available anymore, and it's also part of something bigger?  Did you instrument in cmmgen.ml as well, or do it differently?

Chris


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2003-09-28 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-27 17:51 Chris Hecker
2003-09-27 23:04 ` malc
2003-09-28 11:52 ` Yaron Minsky
     [not found] ` <64571.209.54.74.251.1064749973.squirrel@minsky-primus.home ip.net>
2003-09-28 16:39   ` Chris Hecker [this message]
2003-09-28 22:10     ` malc
2003-09-28 19:18 ` Byron Hale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20030928092301.028387b8@localhost \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=yminsky@cs.cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).