Logging, runtime tracing, and the obs performance profiler for OCaml
0

Configure Feed

Select the types of activity you want to include in your feed.

observe: alloc rate from the ring GC counters when there is no .ctf

The alloc rate divided total_alloc_words, which only the memtrace .ctf
fills -- a guest streams the exact minor/major allocation counters over
the ring but writes no .ctf (no filesystem), so the rate read 0 w/s
despite millions of words. Fall back to minor+major words when there are
no memtrace samples.

+7 -2
+7 -2
lib/obs/memtrace_eio.ml
··· 1221 1221 share = float_of_int words /. float_of_int total; 1222 1222 }) 1223 1223 in 1224 + let total_words = t.minor_words + t.major_words in 1224 1225 let alloc_rate = 1225 1226 let span = if wall_time > 0. then wall_time else alloc_wall in 1226 - safe_div (float_of_int t.total_alloc_words) span 1227 + (* Allocation comes from the memtrace samples when present, else the exact 1228 + ring GC counters -- a guest streams the counters but writes no .ctf. *) 1229 + let words = 1230 + if t.total_alloc_words > 0 then t.total_alloc_words else total_words 1231 + in 1232 + safe_div (float_of_int words) span 1227 1233 in 1228 - let total_words = t.minor_words + t.major_words in 1229 1234 let promoted_frac = 1230 1235 safe_div (float_of_int t.promoted_words) (float_of_int total_words) 1231 1236 in