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 A69B37F919 for ; Thu, 19 May 2016 20:46:20 +0200 (CEST) IronPort-PHdr: 9a23:h4OOqRL7zDfS4TckFtmcpTZWNBhigK39O0sv0rFitYgULP3xwZ3uMQTl6Ol3ixeRBMOAu6MC0LCd6vmxEUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35XxjLr5osSCKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ6jiR6WRgKK4j4YU34KuhtOGQnMqh/gDbnrtS6vnepn2TKGPMTwBZQ1Xzij4O8/TB7uhCYIHzE8+WDTzMd3ifQI81qauxVjztuMM8muP/1kc/aYJItCSA== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=lindig@gmail.com; spf=Pass smtp.mailfrom=lindig@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f43.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lindig@gmail.com) identity=pra; client-ip=74.125.82.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lindig@gmail.com"; x-sender="lindig@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of lindig@gmail.com designates 74.125.82.43 as permitted sender) identity=mailfrom; client-ip=74.125.82.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lindig@gmail.com"; x-sender="lindig@gmail.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@mail-wm0-f43.google.com) identity=helo; client-ip=74.125.82.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="lindig@gmail.com"; x-sender="postmaster@mail-wm0-f43.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BuAAAfCD5XeitSfUpehA1+rwGLEAENgXUXB4VzgTw4FAEBAQEBAQEBEQEBCQsLCR8xgi2CGBYRHQEbHQEDEhAPAiYCJREBBQFXh3IBAxcECqQpgTE+MYs7gWqCWAWIIwoZJw1Sg1YBAQgBAQEBAQEBAQEWAgYQcYcagVSGDoF8Cy0TGIIuBZgxgS+EUYgggjeGe4VoRY1FMIEPHgEBgjuBdW2IBgEBAQ X-IPAS-Result: A0BuAAAfCD5XeitSfUpehA1+rwGLEAENgXUXB4VzgTw4FAEBAQEBAQEBEQEBCQsLCR8xgi2CGBYRHQEbHQEDEhAPAiYCJREBBQFXh3IBAxcECqQpgTE+MYs7gWqCWAWIIwoZJw1Sg1YBAQgBAQEBAQEBAQEWAgYQcYcagVSGDoF8Cy0TGIIuBZgxgS+EUYgggjeGe4VoRY1FMIEPHgEBgjuBdW2IBgEBAQ X-IronPort-AV: E=Sophos;i="5.26,335,1459807200"; d="scan'208";a="178366416" Received: from mail-wm0-f43.google.com ([74.125.82.43]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 19 May 2016 20:46:19 +0200 Received: by mail-wm0-f43.google.com with SMTP id n129so243466717wmn.1 for ; Thu, 19 May 2016 11:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:date:message-id:cc:to :mime-version; bh=pT3Xfe5EdVb04OMMChAig5E1zMGNVA1zXWuRigFvhME=; b=CImwLxjD2BQj/OZTKuHPR8mmLopfPFgB5n62mJlOfO0zdOUofBGb0xHmP+JLK+Qxmn bR6F9Hndk1VnMjhNzr6A4RpQBRGJ5EN4LhKCCba82BRFmw0J3wbQ5tdID+xrzzIil3PS Qc1ITRs4WqRZPMY0laYkwjQRgS9O+8qtUSNKFQQpK3WNubzWtXCYUmq828Gyft553g+y zqURJX8/OqhWXXD5CX5Vec0WLnRgHWmUo6RQP8cOfnzP2zIxhLtQerB4EampNSENP6BX UzZF0YGk5HWym2qhM37Cg+Yz71PsPaaN64YgscPIOvMAzeiLZd1YyRRUH//Lq4YD7S50 yd4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject:date :message-id:cc:to:mime-version; bh=pT3Xfe5EdVb04OMMChAig5E1zMGNVA1zXWuRigFvhME=; b=keZMj/rPF2yok0Bb0xGArlrFHQzmYwDaJt4elkg/z4ZbyMuFaRLdz4TyGkpv79WcJ6 gFbKTWh/9l/Ns6zzCGGB93nnJ7KrMRIgeLLp/D+lu5QBTKMt+YDU+aPxFQO1VpCWwpiy 0bV0aNSv8TTzfPc9RU054KqSsy1EKwYyVTg+Gnrxe6xQMWt490uMexNvso7y+h1f1YI3 t6gUp9P4WMUB6b7tWqDTJtqiIYpGZRoNGxaTPsiwYChMfW5jyHy7flk+O7MtMHf/D5CJ QYvTP2Gnzbk3BI+MWp+GYljkJzIqNFXlwI27fIkboxpIeKuOvYL0xTDJKn5v1RvmIh+I 4KOg== X-Gm-Message-State: AOPr4FUzxWhosOopU0LP5ddxuqx0OtU27WQ6jIK1tu1xkLjewIwrz45wsi+u/sT/g4nq3w== X-Received: by 10.28.5.140 with SMTP id 134mr38558398wmf.80.1463683579581; Thu, 19 May 2016 11:46:19 -0700 (PDT) Received: from christians-air.fritz.box (cpc91240-cmbg18-2-0-cust353.5-4.cable.virginm.net. [82.8.37.98]) by smtp.gmail.com with ESMTPSA id n66sm607690wmn.7.2016.05.19.11.46.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2016 11:46:18 -0700 (PDT) From: Christian Lindig Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 19 May 2016 19:46:17 +0100 Message-Id: <43B63E1B-768C-4C2F-ADCB-C2C994A99EB6@gmail.com> Cc: antonbachin@yahoo.com, Gabriel Scherer To: caml-list@inria.fr Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Subject: [Caml-list] Coverage profiling with bisect_ppx, Oasis, and OCamlbuild - best practice? Bisect_ppx (https://github.com/aantron/bisect_ppx) is a great tool for inst= rument code for coverage profiling. I=E2=80=99d like to explore the best wa= y to use this in a bigger project that is built with Oasis/OCamlbuild. In p= articular, I=E2=80=99d like to find a high-level way to specify that I want= variants of binaries produced, analogous to=20 binary.native binary.byte binary.coverage (say, for native binary with coverage instrumentation) without duplicating too much code in the _oasis file. It is my goal to prod= uce such binaries for installation and hence would like to avoid doing this= sequentially like in=20 make opt; make clean; make byte; make clean=20 but rather have one target that produces all variants. If this is impossibl= e, I=E2=80=99d revert to building variants sequentially. The reason I expec= t this to be difficult is that an object file produced with and without ins= trumentation looks the same and thus it might be difficult for the build sy= stem to understand that these need the be rebuilt.=20 Code instrumented for coverage needs to be compiled with the corresponding = PPX. OCamlfind and OCamlbuild abstracts this nicely. For compiling example.= ml it=E2=80=99s enough to say: ocamlbuild =E2=80=94use-ocamlfind -pkg bisect_ppx example.native It is less obvious how to organise this in a bigger project. (For now I add= rules=20 <**/*.ml{,i,y}>: pkg_bisect_ppx=20 <**/*.native>: pkg_bisect_ppx=20 to the _tags file generated by Oasis.) I believe the problem already arises= with profiling and debugging builds and I would be happy to learn how OCam= lbuild can be directed via myocamlbuild.ml to do this.=20 =E2=80=94 Christian