Skip to content

Commit

Permalink
Move codegen timing hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Oct 31, 2023
1 parent c89838d commit 80973c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -4832,8 +4832,6 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
gboolean generate_enc_seq_points_without_debug_info = FALSE;
InterpBasicBlock *exit_bb = NULL;

mono_interp_pgo_generate_start ();

original_bb = bb = mono_basic_block_split (method, error, header);
goto_if_nok (error, exit);
g_assert (bb);
Expand Down Expand Up @@ -8260,8 +8258,6 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
mono_basic_block_free (original_bb);
td->dont_inline = g_list_remove (td->dont_inline, method);

mono_interp_pgo_generate_end ();

return ret;
exit:
ret = FALSE;
Expand Down Expand Up @@ -11135,6 +11131,7 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG
}

retry:
mono_interp_pgo_generate_start ();
memset (&transform_data, 0, sizeof(transform_data));
td = &transform_data;

Expand Down Expand Up @@ -11339,6 +11336,7 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG
g_array_free (td->line_numbers, TRUE);
g_slist_free (td->imethod_items);
mono_mempool_destroy (td->mempool);
mono_interp_pgo_generate_end ();
if (retry_compilation)
goto retry;
}
Expand Down

0 comments on commit 80973c4

Please sign in to comment.