caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David MENTRE <dmentre@linux-france.org>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] Behaviour of an OCaml program: any possible GC improvement?
Date: Wed, 24 Oct 2012 12:08:46 +0200	[thread overview]
Message-ID: <CAC3Lx=YHyYDqja1qiADBW1O9vXTHN0CCiAqPXrYWi7b0Eg8RFQ@mail.gmail.com> (raw)

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

"""
Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls   s/call   s/call  name
 35.95    190.95   190.95   279963     0.00     0.00  mark_slice
 19.63    295.22   104.27   477027     0.00     0.00  sweep_slice
  9.79    347.23    52.01    88113     0.00     0.00  camlMap__map_181
  6.72    382.95    35.72 3712176346     0.00     0.00  caml_page_table_lookup
  6.23    416.06    33.11   756990     0.00     0.00  caml_oldify_mopup
  4.60    440.47    24.41 3919716797     0.00     0.00  caml_fl_allocate
  3.92    461.31    20.84 3925371187     0.00     0.00  caml_oldify_one
  3.06    477.56    16.25 4125151093     0.00     0.00  caml_fl_merge_block
  2.56    491.15    13.59 3919716670     0.00     0.00  caml_alloc_shr
  1.44    498.82     7.67 3882908903     0.00     0.00
camlData_typing__apply_269
  1.31    505.78     6.96 3919716670     0.00     0.00  allocate_block
  1.14    511.81     6.03        1     6.03     6.03  caml_realloc_ref_table
  0.69    515.45     3.64 3897784282     0.00     0.00  caml_curry2_1
  0.43    517.76     2.31                             caml_set_allocation_policy
  0.41    519.96     2.20  1513980     0.00     0.00  clear_table
  0.40    522.09     2.13                             caml_fl_reset
  0.34    523.90     1.81       74     0.02     0.02  camlMap__iter_175
  0.23    525.11     1.21  7109929     0.00     0.00  caml_gc_message
  0.19    526.14     1.04      127     0.01     0.01  caml_add_to_heap
  0.17    527.04     0.89   756990     0.00     0.00  caml_oldify_local_roots
  0.11    527.61     0.57  8826439     0.00     0.00  caml_curry2
  0.05    527.90     0.29
camlData_typing__print_vset_177
  0.03    528.07     0.17  5946696     0.00     0.00  camlFormat__kpr_643
  0.03    528.22     0.15 10355866     0.00     0.00  camlFormat__doprn_654
  0.03    528.36     0.14 10179867     0.00     0.00
camlFormat__advance_loop_299
  0.02    528.47     0.11 95566619     0.00     0.00  caml_modify
  0.02    528.57     0.11 26632458     0.00     0.00  camlFormat__peek_queue_214
  0.02    528.68     0.11 16452591     0.00     0.00
camlFormat__format_pp_token_255
  0.02    528.78     0.10 15479410     0.00     0.00  caml_putblock
  0.02    528.88     0.10 15457716     0.00     0.00  camlPervasives__output_218
  0.02    528.96     0.08                             caml_c_call
[ ... snipped all functions <= 0.01 % ... ]

Best regards,
david

             reply	other threads:[~2012-10-24 10:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 10:08 David MENTRE [this message]
2012-10-24 10:33 ` John Whitington
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='CAC3Lx=YHyYDqja1qiADBW1O9vXTHN0CCiAqPXrYWi7b0Eg8RFQ@mail.gmail.com' \
    --to=dmentre@linux-france.org \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).