File: count-jit-bail-ops.raku

package info (click to toggle)
moarvm 2024.09%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 43,548 kB
  • sloc: cpp: 378,682; ansic: 293,618; perl: 8,274; java: 2,682; python: 1,296; makefile: 816; sh: 292
file content (15 lines) | stat: -rwxr-xr-x 299 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl6
use v6;
my %counts;
my $logfile = @*ARGS ?? shift @*ARGS !! %*ENV<MVM_JIT_LOG>;

for lines($logfile.IO) -> $line {
    if $line ~~ /'BAIL:'/ {
        $line ~~ /'<' (\w+) '>'/;
        %counts{$/[0].Str}++;
    }
}

for %counts.sort(*.value).reverse -> $pair {
    say $pair;
}