When I try to link my project with "ocamlopt -p ..." it complains "Cannot
find file std_exit.p.cmx". Indeed, the native build did not create
a profiled version of the standard library (while -p compiler flag is
supported). Have I missed something and should build the profiled stdlib
somehow or gprof/ocamlopt -p simply does not work under Windows?
Another related question: I would also like to try some third-party
profiler tool (Intel VTune), but it requires ebp-based stack frame for each
profiled function. It is not true for ocamlopt-generated code. If I modify
the code generation part in the ocaml compiler and add
push ebp
mov ebp, esp
...
pop ebp
to each ocamlopt-generated function, will I break anything?
- Dmitry Bely