File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,14 @@ class HLL::Compiler does HLL::Backend::Default {
178
178
}
179
179
180
180
if nqp ::existskey(% adverbs , ' profile' ) {
181
- $ output := $ ! backend . run_profiled({ $ output (| @ args ) },
182
- % adverbs <profile-filename > || % adverbs <profile >, % adverbs <profile-kind >);
181
+ if nqp ::existskey(% adverbs , ' profile-compile' ) || nqp ::existskey(% adverbs , ' profile-stage' ) {
182
+ note (" Currently you cannot profile both compilation and runtime, ignoring --profile" );
183
+ $ output := $ output (| @ args );
184
+ }
185
+ else {
186
+ $ output := $ ! backend . run_profiled({ $ output (| @ args ) },
187
+ % adverbs <profile-filename > || % adverbs <profile >, % adverbs <profile-kind >);
188
+ }
183
189
}
184
190
elsif % adverbs <trace > {
185
191
$ output := $ ! backend . run_traced(% adverbs <trace >, { $ output (| @ args ) });
@@ -488,7 +494,7 @@ class HLL::Compiler does HLL::Backend::Default {
488
494
}
489
495
490
496
$ result := % adverbs <profile-stage > eq $ _
491
- ?? $ ! backend . run_profiled(& run , % adverbs <profile-filename > || % adverbs <profile >, % adverbs <profile-kind >)
497
+ ?? $ ! backend . run_profiled(& run , % adverbs <profile-filename > || % adverbs <profile-compile >, % adverbs <profile-kind >)
492
498
!! run ();
493
499
494
500
my $ diff := nqp ::time_n() - $ timestamp ;
You can’t perform that action at this time.
0 commit comments