Skip to content

Commit 9b4e67b

Browse files
committed
Base profile kind on filename if not given
1 parent 4313b27 commit 9b4e67b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/vm/moar/HLL/Backend.nqp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ class HLL::Backend::MoarVM {
5959
}
6060
}
6161
method run_profiled($what, $filename, $kind) {
62-
$kind := 'instrumented' unless $kind;
62+
unless $kind {
63+
if $filename ~~ / '.html' | '.json' | '.sql' $ / {
64+
$kind := 'instrumented';
65+
} elsif $filename ~~ / '.mvmheap' $ / {
66+
$kind := 'heap';
67+
} else {
68+
$kind := 'instrumented';
69+
}
70+
}
6371

6472
self.ensure_prof_routines();
6573

0 commit comments

Comments
 (0)