caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] performance profiling on Mac OS?
@ 2015-08-09  3:22 Michael Hicks
  2015-08-10  9:38 ` John Whitington
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Hicks @ 2015-08-09  3:22 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

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.

Thanks,
-Mike

[-- Attachment #2: Type: text/html, Size: 506 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] performance profiling on Mac OS?
  2015-08-09  3:22 [Caml-list] performance profiling on Mac OS? Michael Hicks
@ 2015-08-10  9:38 ` John Whitington
  0 siblings, 0 replies; 2+ messages in thread
From: John Whitington @ 2015-08-10  9:38 UTC (permalink / raw)
  To: Michael Hicks; +Cc: caml-list

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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-10  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-09  3:22 [Caml-list] performance profiling on Mac OS? Michael Hicks
2015-08-10  9:38 ` John Whitington

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).