File: count-jit-bail-ops.p6

package info (click to toggle)
moarvm 2018.12%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,196 kB
  • sloc: ansic: 223,172; perl: 7,638; sh: 4,452; makefile: 1,089; python: 568; asm: 8
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;
}