From c2e3c8542f1a129a0d00effdf218d1de7b59830b Mon Sep 17 00:00:00 2001 From: cs22m036 Date: Sat, 21 Oct 2023 17:09:47 +0530 Subject: [PATCH] addressing issue #17 : https://github.com/ocaml-multicore/parallel-programming-in-multicore-ocaml/issues/17 --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c54d624..7ae3c38 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ following sections: * [Task Distribution using Channels](#task-distribution-using-channels) - [Profiling your code](#profiling-your-code) * [Perf](#perf) - * [Eventlog](#eventlog) + * [Olly](#olly) # Introduction @@ -864,7 +864,7 @@ $ ocaml-eventlog-pausetimes caml-10599-0.eventlog caml-10599-2.eventlog caml-105 **Diagnose Imbalance in Task Distribution** -*Eventlog* can be useful to find imbalance in task distribution +*Eventlog*(for OCaml versions < 5.0) can be useful to find imbalance in task distribution in a parallel program. Imbalance in task distribution essentially means that not all domains are provided with equal amount of computation to perform, so some domains take longer than others to finish their computations, while the idle domains @@ -885,6 +885,17 @@ So far we've only found an imbalance in task distribution in the code, so we'll need to change our code accordingly to make the task distribution more balanced, which could increase the speedup. +If you're running OCaml version > 5.0, you can use Olly to summarize data from runtime events. + +*Olly* Olly is part of the `runtime_events_tools` package. Install Olly on your switch using `opam install runtime_event_tools`. + +Olly can be used in the following manner `olly trace program_trace.json 'program.exe [args]'`. The json file can then be viewed in your browser. + +Olly also allows you to measure the GC latency and view a parseable histogram summary of pause durations. Latency can be measured using +`olly latency 'program.exe [args]'`. + +For more information on runtime instrumentation, please refer here : https://v2.ocaml.org/manual/runtime-tracing.html + --- Performace debugging can be quite tricky at times, so if you could use some help in