Skip to content
Permalink
Browse files

Also show number of garbage collections in default report

  • Loading branch information...
lizmat committed May 23, 2019
1 parent fefe6de commit 51c6e585b73e11e6cd518b39706ec190c7c42700
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/MoarVM/Profiler.pm6
@@ -163,6 +163,7 @@ class MoarVM::Profiler::Thread does OnHash[<
method nr_inlined(--> Int:D) { self.callee.nr_inlined }
method nr_jitted(--> Int:D) { self.callee.nr_jitted }
method nr_osred(--> Int:D) { self.callee.nr_osred }
method nr_gcs(--> Int:D) { +self.gcs }
}

class MoarVM::Profiler {
@@ -195,20 +196,21 @@ class MoarVM::Profiler {

method report(--> Str:D) {
(
" # wallclock objects frames inlined jitted OSRed",
"----+-----------+----------+----------+----------+----------+----------",
" # wallclock objects frames inlined jitted OSR GCs",
"----+-----------+---------+---------+---------+---------+-----+-----",
|self.threads.grep(*.value.nr_frames).sort(*.key).map( {
sprintf("%3d%12d%11d%11d%11d%11d%11d",
sprintf("%3d %11d %9d %9d %9d %9d %5d %5d",
.id,
.total_time,
.nr_allocations,
.nr_frames,
.nr_inlined,
.nr_jitted,
.nr_osred,
.nr_gcs,
) given .value
} ),
"----+-----------+----------+----------+----------+----------+----------",
"----+-----------+---------+---------+---------+---------+-----+-----",
).join("\n")
}

0 comments on commit 51c6e58

Please sign in to comment.
You can’t perform that action at this time.