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 CD3327FFB3 for ; Mon, 14 Mar 2016 09:24:11 +0100 (CET) IronPort-PHdr: 9a23:kIMGaR+RsJnqh/9uRHKM819IXTAuvvDOBiVQ1KB80+8cTK2v8tzYMVDF4r011RmSDdqduq8P0rGI+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStGU3pn8jrvss7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cYk7sb+sVBSaT3ebgjBfwdVWx+cjMD39DwrRTIUSeI43IdVC1WzksJUED560TlXpbtvzLnv/B+kH2FPczqQKkpUC6hx7hrSQPlkToOLT1/93vY3J9elqVe9TeovR83+I7VZp6YMP42KqbGfdIcWmdFWu5TXipMGZ+mYoYTSeEGOLAL/MHGu1ISoE7mVkGXD+T1x2oN2yb7 Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mshinwell@janestreet.com; spf=Pass smtp.mailfrom=mshinwell@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mshinwell@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mshinwell@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; 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@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BgAACtdOZWjnDIaSZDGoQYbQapcY9HdgENgW0jhWYCAgKBHAc4FAEBAQEBAQEBEAEBAQEHFglQgi2CFQEBBBIRHQEBLAsBDwsLDQICCQgVAgIiEgEFAQoSBhMIChCHbQMSAwssnUKBMT4xik9nhEEBBIVmA4ROAQEBAQEBAQMBAQEBAQEBAQERBgpyhRyEQoQ4QYJBgTqGJQyRH4VugnMFhRqCMIxVjT8RHoEPHgEBgjgegVBqAQEBimABAQE X-IPAS-Result: A0BgAACtdOZWjnDIaSZDGoQYbQapcY9HdgENgW0jhWYCAgKBHAc4FAEBAQEBAQEBEAEBAQEHFglQgi2CFQEBBBIRHQEBLAsBDwsLDQICCQgVAgIiEgEFAQoSBhMIChCHbQMSAwssnUKBMT4xik9nhEEBBIVmA4ROAQEBAQEBAQMBAQEBAQEBAQERBgpyhRyEQoQ4QYJBgTqGJQyRH4VugnMFhRqCMIxVjT8RHoEPHgEBgjgegVBqAQEBimABAQE X-IronPort-AV: E=Sophos;i="5.24,334,1454972400"; d="scan'208";a="168505439" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2016 09:24:10 +0100 Received: from tot-qpr-mailcore2.delacy.com ([172.27.56.106] helo=tot-qpr-mailcore2) by mxout1.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1afNnN-0000Rh-Rv for caml-list@inria.fr; Mon, 14 Mar 2016 04:24:09 -0400 X-JS-Flow: external Received: by tot-qpr-mailcore2 with JS-mailcore (0.1) (envelope-from ) id BW5nUp-AAACkt-ZW; 2016-03-14 04:24:09.812298-04:00 Received: from mail-ob0-f181.google.com ([209.85.214.181]) by mxgoog1.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1afNnN-0005lg-Nc for caml-list@inria.fr; Mon, 14 Mar 2016 04:24:09 -0400 Received: by mail-ob0-f181.google.com with SMTP id fp4so168516419obb.2 for ; Mon, 14 Mar 2016 01:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=xZJLYXlb/KapsSA2lIS22RUia/Qch6x0tTpWwddbhfI=; b=XRqriJ7jD6oQrvaFJtS192Tala7LVqmmifzXGlvRPlEZBmBaFC96utJYX4pxz1e6xf MdGPqsPSV5m1Vi5C5rYnw6iFn0QXtYK8CgDBiFcv9tRrlw6oM8aaHXIUAGV9a3ucS8zO w3uVEuNyIWeGJYcDbvhXXYUjmXSH+5qQN1mjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=xZJLYXlb/KapsSA2lIS22RUia/Qch6x0tTpWwddbhfI=; b=VzBFixazb971XmCGeASGMJxno+pATFUlhzdV1LBrbQblDHMc+6l7C9t5ybm9XQ6GLI j1tqnQIjUPidF0HSwruolFPfOrsu/TSbt7n4tq6RtkMMLfLMGjvKuf1Ch67/mrouLUhS JsoOr8sIksIRGfRALQt+/uJNw7OBzxp+X5VurIf8Uy0/KIkJ9VyqsE2hY1/9fU5Rn4Sv OGP/FBbIB41eNPK6Y5Q9Kls5KSsQV9l2f+IjaW319IrM5UgBMOu3qrpluBHk2AufEq79 HKSmTONJMDesGkcLzzo4ccHvKQi+LGFENhx90Y6BExV9gShino2UdfSB960LHC/LDmua +SQA== X-Gm-Message-State: AD7BkJI+KCqOeKHPYQx9ypHEQWq7tZ5tB12Dyi66ouR48J3WUsBIxbxJsa6x997I/U4gPVHEYt6sX7wCbuf97nDvLZ134Nken+oqzDEV+j8aA3CQMJ2mpGtNkLm8yfohVpQqq+0Wrn3Ckfff2FC4 X-Received: by 10.60.128.229 with SMTP id nr5mr13774545oeb.56.1457943849292; Mon, 14 Mar 2016 01:24:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.128.229 with SMTP id nr5mr13774536oeb.56.1457943849168; Mon, 14 Mar 2016 01:24:09 -0700 (PDT) Received: by 10.202.216.214 with HTTP; Mon, 14 Mar 2016 01:24:09 -0700 (PDT) In-Reply-To: References: <30AF5A7CB977477A9BF094F3BC19C58C@erratique.ch> Date: Mon, 14 Mar 2016 08:24:09 +0000 Message-ID: From:Mark Shinwell To:whitequark Cc:Ivan Gotovchits , =?UTF-8?Q?Daniel_B=C3=BCnzli?= , platform , OCaml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-JS-Processed-by: mailcore X-Validation-by: mshinwell@janestreet.com Subject: Re: [Caml-list] Package compilation and debug mode I think there is a penalty (albeit a lesser one) with -g even if OCAMLRUNPARAM does not contain "b". Raising an exception from OCaml code causes a function call, which it does not otherwise. Mark On 14 March 2016 at 08:14, whitequark wrote: > 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=3Db, 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=E2=80=99m wrong). Presumably, there is some increa= se 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=C3=BCnzli >>>> 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 ha= ve >>>> 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 automatical= ly >>>> enables the flag. >>>> >>>> So I think OCaml's opam repository should have a policy here. The answ= er >>>> should also take system package managers into account since those pull >>>> directly from the tarballs (if this document [3] is still in use for d= ebian >>>> 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=3D6728 >>>> [2] http://rgrinberg.com/blog/2016/02/26/opam-package-checklist/ >>>> [3] >>>> http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.html/c= 305.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