From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 855437F0AF for ; Mon, 14 Mar 2016 09:14:35 +0100 (CET) IronPort-PHdr: 9a23:pYuoDBZihqWlwZVeXMvUK6L/LSx+4OfEezUN459isYplN5qZpM+7bnLW6fgltlLVR4KTs6sC0LqJ9fG9EjVavt6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDtvcyOKFwS23KUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGY2zRakzTKRZATI6KCh1oZSz7ViQezOP52AcU2MZ1ztQJQXZ8xbgXd+x6XOi97lL4zSBJcD9UZwzXD2j6e8rFE6p2287MGsc+XvUwvdwjaRErRal70h62I7VZp6YMP5WfKrbcMgGX2dMQoBaUCkXUa2maI5aEOoAIetBsoDnpBNashu/GQS1Ger1yRdXhn7q0LQn2v4iVwbc01pzTJo1rH3IoYCsZ+8pWuevwfySkWTO Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=whitequark@whitequark.org; spf=Pass smtp.mailfrom=whitequark@whitequark.org; spf=None smtp.helo=postmaster@mail.whitequark.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of whitequark@whitequark.org) identity=pra; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of whitequark@whitequark.org designates 176.58.103.125 as permitted sender) identity=mailfrom; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.whitequark.org) identity=helo; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="postmaster@mail.whitequark.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B6CABMcuZW/31nOrBDGoQYbYJtpwqPR4JxI4VqAoFfEAEBAQEBAQEBYyeCMoIPAQEBAwEjDwEFNgsQBAcJBQoCAgkIFQICLBkSBhMICod9AwoMCiyrGIorA4ROAQEBBwIefIUbgyqBGYR5gkGBOgWGIAyHfYkighCDXoJzBYUTgjeMVY59NyuDZzkuAQEBimABAQE X-IPAS-Result: A0B6CABMcuZW/31nOrBDGoQYbYJtpwqPR4JxI4VqAoFfEAEBAQEBAQEBYyeCMoIPAQEBAwEjDwEFNgsQBAcJBQoCAgkIFQICLBkSBhMICod9AwoMCiyrGIorA4ROAQEBBwIefIUbgyqBGYR5gkGBOgWGIAyHfYkighCDXoJzBYUTgjeMVY59NyuDZzkuAQEBimABAQE X-IronPort-AV: E=Sophos;i="5.24,334,1454972400"; d="scan'208";a="168503689" Received: from fehu.whitequark.org (HELO mail.whitequark.org) ([176.58.103.125]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 14 Mar 2016 09:14:34 +0100 Received: by mail.whitequark.org (Postfix, from userid 33) id 7D16110C91B; Mon, 14 Mar 2016 08:14:31 +0000 (UTC) To: Mark Shinwell X-PHP-Originating-Script: 1000:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 14 Mar 2016 11:14:31 +0300 From: whitequark Cc: Ivan Gotovchits , =?UTF-8?Q?Daniel_B=C3=BCnzli?= , platform , OCaml List In-Reply-To: References: <30AF5A7CB977477A9BF094F3BC19C58C@erratique.ch> Message-ID: X-Sender: whitequark@whitequark.org User-Agent: Roundcube Webmail/1.1.4 Subject: Re: [Caml-list] Package compilation and debug mode 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 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 >>> 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