Given a binary file compiled with OCaml, is there a way to find out if it has been compiled with profiling information (either using ocamlcp/ocamloptp, or with gprof-specific data via ocamlopt -p)?
Given a binary file compiled with OCaml, is there a way to find out
Share
If you run
ocamlobjinfoon a profiled bytecode file, it shows Profiling as one of the imported interfaces:Update
On my system (OS X) A profiled native executable contains a definition of
camlProfilingand related symbols:It seems very likely this will work on every system that supports
nm.