Skip to content

Commit 1db1fed

Browse files
committed
test
1 parent 396926f commit 1db1fed

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

core/iwasm/common/wasm_runtime_common.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,20 +641,24 @@ wasm_runtime_init()
641641
static void
642642
wasm_runtime_destroy_internal(void)
643643
{
644+
LOG_DEBUG("%s %d", __func__, __LINE__);
644645
#if WASM_ENABLE_GC == 0 && WASM_ENABLE_REF_TYPES != 0
645646
wasm_externref_map_destroy();
646647
#endif
648+
LOG_DEBUG("%s %d", __func__, __LINE__);
647649

648650
#if WASM_ENABLE_AOT != 0
649651
#if WASM_ENABLE_DEBUG_AOT != 0
650652
jit_debug_engine_destroy();
651653
#endif
652654
#endif
655+
LOG_DEBUG("%s %d", __func__, __LINE__);
653656

654657
#ifdef OS_ENABLE_HW_BOUND_CHECK
655658
runtime_signal_destroy();
656659
#endif
657660

661+
LOG_DEBUG("%s %d", __func__, __LINE__);
658662
/* runtime env destroy */
659663
#if WASM_ENABLE_MULTI_MODULE
660664
wasm_runtime_destroy_loading_module_list();
@@ -663,6 +667,7 @@ wasm_runtime_destroy_internal(void)
663667
wasm_runtime_destroy_registered_module_list();
664668
os_mutex_destroy(&registered_module_list_lock);
665669
#endif
670+
LOG_DEBUG("%s %d", __func__, __LINE__);
666671

667672
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
668673
/* Destroy LLVM-JIT compiler after destroying the modules
@@ -674,6 +679,7 @@ wasm_runtime_destroy_internal(void)
674679
*/
675680
aot_compiler_destroy();
676681
#endif
682+
LOG_DEBUG("%s %d", __func__, __LINE__);
677683

678684
#if WASM_ENABLE_FAST_JIT != 0
679685
/* Destroy Fast-JIT compiler after destroying the modules
@@ -682,40 +688,53 @@ wasm_runtime_destroy_internal(void)
682688
*/
683689
jit_compiler_destroy();
684690
#endif
691+
LOG_DEBUG("%s %d", __func__, __LINE__);
685692

686693
#if WASM_ENABLE_SHARED_MEMORY
687694
wasm_shared_memory_destroy();
688695
#endif
696+
LOG_DEBUG("%s %d", __func__, __LINE__);
689697

690698
#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_THREAD_MGR != 0)
691699
#if WASM_ENABLE_DEBUG_INTERP != 0
692700
wasm_debug_engine_destroy();
693701
#endif
694702
thread_manager_destroy();
695703
#endif
704+
LOG_DEBUG("%s %d", __func__, __LINE__);
696705

697706
wasm_native_destroy();
707+
LOG_DEBUG("%s %d", __func__, __LINE__);
698708
bh_platform_destroy();
709+
LOG_DEBUG("%s %d", __func__, __LINE__);
699710

700711
wasm_runtime_memory_destroy();
712+
LOG_DEBUG("%s %d", __func__, __LINE__);
701713
}
702714

703715
void
704716
wasm_runtime_destroy()
705717
{
718+
LOG_DEBUG("%s %d", __func__, __LINE__);
706719
#if defined(OS_THREAD_MUTEX_INITIALIZER)
707720
os_mutex_lock(&runtime_lock);
708721
#endif
722+
LOG_DEBUG("%s %d", __func__, __LINE__);
709723

710724
bh_assert(runtime_ref_count > 0);
711725
runtime_ref_count--;
726+
LOG_DEBUG("%s %d", __func__, __LINE__);
712727
if (runtime_ref_count == 0) {
728+
LOG_DEBUG("%s %d", __func__, __LINE__);
713729
wasm_runtime_destroy_internal();
730+
LOG_DEBUG("%s %d", __func__, __LINE__);
714731
}
732+
LOG_DEBUG("%s %d", __func__, __LINE__);
715733

716734
#if defined(OS_THREAD_MUTEX_INITIALIZER)
717735
os_mutex_unlock(&runtime_lock);
718736
#endif
737+
LOG_DEBUG("%s %d", __func__, __LINE__);
719738
}
720739

721740
RunningMode

0 commit comments

Comments
 (0)