We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f54c1a1 commit 05cb90eCopy full SHA for 05cb90e
src/vm/moar/HLL/Backend.nqp
@@ -38,11 +38,15 @@ class HLL::Backend::MoarVM {
38
}
39
40
method run_profiled($what) {
41
+ my @END := nqp::gethllsym('perl6', '@END_PHASERS');
42
+ @END.push: -> { self.dump_profile_data($prof_end_sub()) } if nqp::defined(@END);
43
self.ensure_prof_routines();
44
$prof_start_sub(nqp::hash());
45
my $res := $what();
- my $data := $prof_end_sub();
- self.dump_profile_data($data);
46
+ unless nqp::defined(@END) {
47
+ my $data := $prof_end_sub();
48
+ self.dump_profile_data($data);
49
+ }
50
$res;
51
52
method dump_profile_data($data) {
0 commit comments