File: count-jit-bail-ops.p6

package info (click to toggle)
moarvm 2016.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,060 kB
  • ctags: 9,968
  • sloc: ansic: 131,697; perl: 2,877; makefile: 571; python: 562; sh: 12
file content (15 lines) | stat: -rwxr-xr-x 301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl6-m
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;
}