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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 361827EEF8 for ; Mon, 10 Aug 2015 11:38:16 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=pra; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of john@coherentgraphics.co.uk) identity=mailfrom; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="john@coherentgraphics.co.uk"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mx2.ukhost4u.com) identity=helo; client-ip=188.64.186.7; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="john@coherentgraphics.co.uk"; x-sender="postmaster@mx2.ukhost4u.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AfAQAicMhVnAe6QLxdDoNhb4MevBmFfQKBL0wBAQEBAQESAQEBAQEICwkJIS6EJAEBBCMVQAEQCwcHCgICBRYLAgIJAwIBAgFFBg6INwG4M5ViAQEBBwEBAQEBHYEiii+FCQeCaYFDAQSVC40yiBSRGoNlP4I4gQQBAQE X-IPAS-Result: A0AfAQAicMhVnAe6QLxdDoNhb4MevBmFfQKBL0wBAQEBAQESAQEBAQEICwkJIS6EJAEBBCMVQAEQCwcHCgICBRYLAgIJAwIBAgFFBg6INwG4M5ViAQEBBwEBAQEBHYEiii+FCQeCaYFDAQSVC40yiBSRGoNlP4I4gQQBAQE X-IronPort-AV: E=Sophos;i="5.15,644,1432591200"; d="scan'208";a="173148830" Received: from mx2.ukhost4u.com ([188.64.186.7]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Aug 2015 11:38:15 +0200 Received: from bluechip4.ukhost4u.com ([188.64.184.40]) by mx2.ukhost4u.com with esmtps (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZOjWz-0006Mx-C9; Mon, 10 Aug 2015 10:38:14 +0100 Received: from [86.6.29.185] (port=60537 helo=[192.168.0.2]) by bluechip4.ukhost4u.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZOjWw-004BBA-RV; Mon, 10 Aug 2015 10:38:08 +0100 Message-ID: <55C870FC.2030001@coherentgraphics.co.uk> Date: Mon, 10 Aug 2015 10:38:04 +0100 From: John Whitington User-Agent: Postbox 4.0.1 (Macintosh/20150514) MIME-Version: 1.0 To: Michael Hicks CC: caml-list@inria.fr References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-2.9 X-AuthUser: john@coherentgraphics.co.uk X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bluechip4.ukhost4u.com X-AntiAbuse: Original Domain - X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - coherentgraphics.co.uk X-Get-Message-Sender-Via: bluechip4.ukhost4u.com: none X-Filter-ID: s0sct1PQhAABKnZB5plbIf846yA3iTMvdsVmSdrHPMU9CTo+a6AtXGOZ5s/KMzk3GXNQvgP2LFpq 9ASq+UttQVQHeWbm+XiK4rgOvP1JYkjhQrEdXZUWWCwT9nl1lMSLeGGTijB7LQZc/qu1kt6uZHg9 i+nEmou2UMHgmE6z+uPpnAH3Z/yWJ/1UVv3cE79AoX0DxZ3XxkhzzXFqMXykfnNcsNaaadH9QefO pl59rz3XYu/IcQJuWHlbnMOsg605eAjIosIPGRC2/1Po3Kz/TrwqyT5p50x81ZKcmzCu2U0jke6p mY/eyFBh5uotGX3l0ZD8DyLF3+slnbNDIAbOlB1ACx1tx69isfqyA3M6a6Zyp49ADfjfl/xRHsrF VyL36lneXDOHP4sd+B5NgJr7R/OYZsiv0E7EsdU4Z57haDLncZq2fyR4iPhJpmjHwpNRPjXILEpF tj1KbLwqGtrQBN0kMj5LgN3P6rTlFvAY6v226py83tvjKTTar638GvP5HwFVQCw2a2Qz+0jROVIt xRaNZpWMv0m92L2hotU3zaTGBZOyb7zkDvaeZ4ujJFdrnPByUG6UQzrtTBPkZ35MjFOvY1MFJdEf q7p1dvZxP+XTvup0mlfqBiAyNtAvTsAcaDzk2qBfP4u4rgE+EVEkxPv2EwFMyChA4XSUAxJsdi2x 8z2TXaWpli0WZ50uRpHCG8FV/fQARVcG5/WF9EqvuQ== X-Report-Abuse-To: spam@mx1.ukhost4u.com X-Filter-Fingerprint: IFrWXGses7OKB5S5G8/dJRn/7L7+nnclbWGk7OJ1jHJA3cTUQ1R++keuE7RDJ8Kg3RbMLUalw1oC mj99/u+PoqoVy8a3lsStJtAvpObFX0Wok1JBYnOLzfRIhlEHQynLUpndEJ0YoaLytXXo8BMTaVt0 ARHRi6XGuAluI1udprFy32DUYpEhA3j9NJFmItfypuoazoDH3m92PL21GfhFYWcYmGLKZUTyGy/B A6iJtsD8WFC+rpTT4JYvoDjVeZUw3fI9smEy0EupqfCN6sn6Zg== X-Originating-IP: 188.64.184.40 X-SpamExperts-Domain: bluechip4.ukhost4u.com X-SpamExperts-Username: 188.64.184.40 Authentication-Results: ukhost4u.com; auth=pass smtp.auth=188.64.184.40@bluechip4.ukhost4u.com X-SpamExperts-Outgoing-Class: unsure X-SpamExperts-Outgoing-Evidence: Combined (0.59) X-Recommended-Action: accept Subject: Re: [Caml-list] performance profiling on Mac OS? Hi, Michael Hicks wrote: > Hi all. > > I have an OCaml program that uses the C FFI extensively, and I'm trying > to profile the overall program (both the OCaml and C parts), to figure > out how much time is spent where. > > Do people have suggestions for doing profiling on Mac OS? > > Since it uses LLVM, and not gcc, it seems that gprof (per the OCaml > manual) is not an option. instruments(1) and its graphical equivalent Instruments.app come with XCode. It does seem to work reasonably well with OCaml code compiled and linked with -g. At least, not much worse than the output of gprof on OCaml code. There is an option in the graphical one called something like "Invert graph" which helps to show where most time was spent. Or, if it's not an OS X specific program, compile it in a Linux VM and use gprof or similar. Thanks, -- John Whitington Director, Coherent Graphics Ltd http://www.coherentpdf.com/