Use logger for runtime error/debug prints (#3097)
Change runtime internal error/debug prints from using `os_printf()` to using `LOG_ERROR()`/`LOG_DEBUG()`.
This commit is contained in:
@ -2024,7 +2024,7 @@ orcjit_thread_callback(void *arg)
|
||||
/* Compile fast jit funcitons of this group */
|
||||
for (i = group_idx; i < func_count; i += group_stride) {
|
||||
if (!jit_compiler_compile(module, i + module->import_function_count)) {
|
||||
os_printf("failed to compile fast jit function %u\n", i);
|
||||
LOG_ERROR("failed to compile fast jit function %u\n", i);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2051,7 +2051,7 @@ orcjit_thread_callback(void *arg)
|
||||
if (!jit_compiler_set_call_to_fast_jit(
|
||||
module,
|
||||
i + j * group_stride + module->import_function_count)) {
|
||||
os_printf(
|
||||
LOG_ERROR(
|
||||
"failed to compile call_to_fast_jit for func %u\n",
|
||||
i + j * group_stride + module->import_function_count);
|
||||
module->orcjit_stop_compiling = true;
|
||||
@ -2101,7 +2101,7 @@ orcjit_thread_callback(void *arg)
|
||||
LLVMOrcLLLazyJITLookup(comp_ctx->orc_jit, &func_addr, func_name);
|
||||
if (error != LLVMErrorSuccess) {
|
||||
char *err_msg = LLVMGetErrorMessage(error);
|
||||
os_printf("failed to compile llvm jit function %u: %s", i, err_msg);
|
||||
LOG_ERROR("failed to compile llvm jit function %u: %s", i, err_msg);
|
||||
LLVMDisposeErrorMessage(err_msg);
|
||||
break;
|
||||
}
|
||||
@ -2122,7 +2122,7 @@ orcjit_thread_callback(void *arg)
|
||||
func_name);
|
||||
if (error != LLVMErrorSuccess) {
|
||||
char *err_msg = LLVMGetErrorMessage(error);
|
||||
os_printf("failed to compile llvm jit function %u: %s", i,
|
||||
LOG_ERROR("failed to compile llvm jit function %u: %s", i,
|
||||
err_msg);
|
||||
LLVMDisposeErrorMessage(err_msg);
|
||||
/* Ignore current llvm jit func, as its func ptr is
|
||||
|
||||
Reference in New Issue
Block a user