From: John Whitington <john@coherentgraphics.co.uk>
To: David MENTRE <dmentre@linux-france.org>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Behaviour of an OCaml program: any possible GC improvement?
Date: Wed, 24 Oct 2012 11:33:45 +0100 [thread overview]
Message-ID: <5087C409.3030203@coherentgraphics.co.uk> (raw)
In-Reply-To: <CAC3Lx=YHyYDqja1qiADBW1O9vXTHN0CCiAqPXrYWi7b0Eg8RFQ@mail.gmail.com>
Hi David,
David MENTRE wrote:
> Hello,
>
> I'm using OCaml 3.11.2 on Linux (Debian Squeeze 6.0) x86_64 platform.
>
> I have a program that exhibits the following gprof profile. A lot of
> time is spent in the GC (more than 56 %). Is there anything I can do
> with respect to the GC? Otherwise, this program is a typical symbolic
> manipulation program, handling trees made of Sum types and small lists
> of them (1 to 3 elements).
Can you supply the section under "caml_call_gc"? For example:
> 0.00 0.03 1/4988 camlPdfutil__fun_2922 [136]
> 0.00 0.03 1/4988 camlPdfutil__takewhile_reverse_inner_1655 [133]
> 0.00 0.03 1/4988 camlPdfutil__ilist_1873 [135]
> 0.00 0.03 1/4988 camlPdf__x1_1414 [130]
> 0.00 0.03 1/4988 camlPdfread__lex_object_at_1344 [132]
> 0.00 0.03 1/4988 camlPdfread__process_parse_dictionary_1440 [103]
> 0.00 0.03 1/4988 camlPdfread__parse_dictionary_1451 <cycle 1> [97]
> 0.00 0.03 1/4988 camlPdfread__parse_to_tree_1473 <cycle 1> [131]
> 0.00 0.03 1/4988 camlHashtbl__insert_bucket_1068 [129]
> 0.00 0.07 2/4988 camlPdfwrite__fun_1642 <cycle 1> [110]
> 0.00 0.07 2/4988 camlPdfread__mkpairs_1442 [112]
> 0.00 0.07 2/4988 camlPdfread__fun_2689 <cycle 1> [111]
> 0.00 0.10 3/4988 camlPdfread__lex_name_1217 <cycle 1> [92]
> 0.00 0.14 4/4988 camlPdf__fun_1934 [98]
> 0.00 0.14 4/4988 camlHashtbl__replace_1112 [96]
> 0.00 1.93 56/4988 camlPdfread__lex_string_1230 [32]
> 0.00 2.93 85/4988 camlPdfwrite__strings_of_pdf_1131 <cycle 1> [24]
> 0.00 3.79 110/4988 camlPdfread__lex_number_1211 [28]
> 0.00 5.10 148/4988 camlPdfgenlex__lex_item_1109 [45]
> 0.00 8.86 257/4988 camlHashtbl__mem_1122 [42]
> 0.00 13.24 384/4988 camlPdfread__parse_array_1452 <cycle 1> [35]
> 0.00 13.34 387/4988 camlList__rmap_f_1070 <cycle 1> [34]
> 0.00 31.34 909/4988 camlPdfread__parse_R_inner_1422 [26]
> 0.00 40.23 1167/4988 camlList__rev_append_1051 [23]
> 0.00 50.30 1459/4988 camlPdfread__lex_object_at_1352 <cycle 1> [21]
> [7] 65.5 0.00 171.97 4988 caml_call_gc [7]
> 0.00 171.97 4988/4988 caml_garbage_collection [8]
This is usually a good starting point.
Thanks,
--
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/
next prev parent reply other threads:[~2012-10-24 10:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 10:08 David MENTRE
2012-10-24 10:33 ` John Whitington [this message]
2012-10-24 12:30 ` David MENTRE
2012-10-24 12:39 ` John Whitington
2012-10-24 12:45 ` Edgar Friendly
2012-10-24 12:53 ` John Whitington
2012-10-24 13:19 ` David MENTRE
2012-10-24 13:27 ` John Whitington
2012-10-24 13:38 ` Oliver Bandel
2012-10-24 14:30 ` David MENTRE
2012-10-24 15:09 ` David MENTRE
2012-10-24 16:07 ` AW: " Gerd Stolpmann
2012-10-24 17:23 ` Martin Jambon
[not found] ` <1351094817.12207.11@samsung>
2012-10-25 6:48 ` David MENTRE
2012-10-25 7:37 ` David House
2012-10-24 10:38 ` Török Edwin
2012-10-25 10:06 ` David MENTRE
2012-10-25 10:16 ` Török Edwin
2012-10-25 10:19 ` David MENTRE
2012-11-07 11:52 ` David MENTRE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5087C409.3030203@coherentgraphics.co.uk \
--to=john@coherentgraphics.co.uk \
--cc=caml-list@inria.fr \
--cc=dmentre@linux-france.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox