From: whitequark <whitequark@whitequark.org>
To: Mark Shinwell <mshinwell@janestreet.com>
Cc: "Ivan Gotovchits" <ivg@ieee.org>,
"Daniel Bünzli" <daniel.buenzli@erratique.ch>,
platform <platform@lists.ocaml.org>,
"OCaml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Package compilation and debug mode
Date: Mon, 14 Mar 2016 11:14:31 +0300 [thread overview]
Message-ID: <af7e2dc9015f855768acb55776e01dea@whitequark.org> (raw)
In-Reply-To: <CAM3Ki77ReywMx-jQGsjVyFFJL84-2ex-P1XxMxYoBhaHSbhBjg@mail.gmail.com>
On 2016-03-14 10:19, Mark Shinwell wrote:
> There is a performance penalty with -g: it makes the raising of
> exceptions slower (due to recording of backtraces). I think that may
> be the only difference at present, though I'm not completely sure.
This penalty is only present with OCAMLRUNPARAM=b, which is now on by
default. This is a good thing, because lack of backtraces is something
100% of newcomers trip over; and anyone who dislikes the penalty
can trivially turn it off.
However, -g also inhibits some optimizations along with adding debug
info.
So it is still not free.
IMO there should be another option, something like -debug-info, that is
equivalent to -g but does not inhibit any optimizations. Then it would
be enabled by default.
>
> Mark
>
> On 13 March 2016 at 19:16, Ivan Gotovchits <ivg@ieee.org> wrote:
>> It looks like, that currently the `-g` option has no performance cost
>> at all (correct me if I’m wrong). Presumably, there is some increase
>> in the package size, but who cares. With these premises, I think it
>> would be a good policy to distribute packages with `-g` flag enabled.
>>
>>> On Mar 12, 2016, at 4:35 PM, Daniel Bünzli
>>> <daniel.buenzli@erratique.ch> wrote:
>>>
>>> Hello,
>>>
>>> I'd like to know what the consensus is about distributing packages
>>> that always compile in debug mode. It seems that some persons do want
>>> to have debug always enabled [1,2], but the discussion is not clear
>>> cut [1].
>>>
>>> By default all my packages are released with -g disabled. It seems
>>> easy enough to have an opam switch (even the official one) that
>>> automatically enables the flag.
>>>
>>> So I think OCaml's opam repository should have a policy here. The
>>> answer should also take system package managers into account since
>>> those pull directly from the tarballs (if this document [3] is still
>>> in use for debian it seems they do require compilation with debug
>>> mode).
>>>
>>> Personally I don't have an opinion about it, I'm rather seeking an
>>> answer here.
>>>
>>> Best,
>>>
>>> Daniel
>>>
>>> [1] http://caml.inria.fr/mantis/view.php?id=6728
>>> [2] http://rgrinberg.com/blog/2016/02/26/opam-package-checklist/
>>> [3]
>>> http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.html/c305.html#AEN307
>>>
>>>
>>>
>>> --
>>> Caml-list mailing list. Subscription management and archives:
>>> https://sympa.inria.fr/sympa/arc/caml-list
>>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>>
>> --
>> Caml-list mailing list. Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
--
whitequark
next prev parent reply other threads:[~2016-03-14 8:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 21:35 Daniel Bünzli
2016-03-13 19:16 ` Ivan Gotovchits
2016-03-14 7:19 ` Mark Shinwell
2016-03-14 8:14 ` whitequark [this message]
2016-03-14 8:24 ` Mark Shinwell
2016-03-23 9:43 ` Daniel Bünzli
2016-03-23 10:02 ` Thomas Gazagnaire
2016-03-23 10:12 ` [Caml-list] [ocaml-platform] " Gabriel Scherer
2016-03-23 10:23 ` [Caml-list] " Daniel Bünzli
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=af7e2dc9015f855768acb55776e01dea@whitequark.org \
--to=whitequark@whitequark.org \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
--cc=ivg@ieee.org \
--cc=mshinwell@janestreet.com \
--cc=platform@lists.ocaml.org \
/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).