Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiling function calls #2654

Closed
vicuna opened this issue Jun 8, 2004 · 2 comments
Closed

Profiling function calls #2654

vicuna opened this issue Jun 8, 2004 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 8, 2004

Original bug ID: 2654
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Prakash Countcham
Version: 3.07+2
OS: Linux
Submission from: pc-atinf2.imag.fr (147.171.130.142)

The -p f option doesn't work in the last versions of ocamlcp.

e.g.:

$ ocamlcp -p f profil.ml
$ ./a.out
$ ocamlprof profil.ml
let f a b = a + b;;

let _ =
for i = 1 to 10 do
ignore (f 1 i)
done;;

It worked with some previous version. The same example in OCaml 3.04 gives the
right result :

let f a b = (* 10 *) a + b;;

let _ =
for i = 1 to 10 do
ignore (f 1 i)
done;;

TIA,

Prakash

@vicuna
Copy link
Author

vicuna commented Jun 11, 2004

Comment author: administrator

Full_Name: Prakash Countcham
Version: 3.07+2

The -p f option doesn't work in the last versions of ocamlcp.

Thank you for your bug report. This is now fixed in the CVS version.
You can apply the enclosed patch to fix it in 3.07+2.

-- Damien

Index: tools/ocamlprof.ml

====
RCS file: /net/pauillac/caml/repository/csl/tools/ocamlprof.ml,v
retrieving revision 1.34
diff -c -r1.34 tools/ocamlprof.ml
*** tools/ocamlprof.ml 2004/04/15 16:19:37 1.34
--- tools/ocamlprof.ml 2004/06/11 13:19:37


*** 178,184 ****
rewrite_exp iflag sbody

| Pexp_function (_, _, caselist) ->

! if !instr_fun && not sexp.pexp_loc.loc_ghost then
rewrite_function iflag caselist
else
rewrite_patlexp_list iflag caselist
--- 178,184 ----
rewrite_exp iflag sbody

| Pexp_function (_, _, caselist) ->

! if !instr_fun then
rewrite_function iflag caselist
else
rewrite_patlexp_list iflag caselist

@vicuna
Copy link
Author

vicuna commented Jun 11, 2004

Comment author: administrator

fixed DD 2004-06-11

@vicuna vicuna closed this as completed Jun 11, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant