summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_init.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 4fa5887e87..1153411dd5 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -273,10 +273,6 @@ init_gallivm_engine(struct gallivm_state *gallivm)
LLVMDisposeMessage(error);
goto fail;
}
-
-#if defined(DEBUG) || defined(PROFILE)
- lp_register_oprofile_jit_event_listener(gallivm->engine);
-#endif
}
LLVMAddModuleProvider(gallivm->engine, gallivm->provider);//new
@@ -635,6 +631,7 @@ gallivm_compile_module(struct gallivm_state *gallivm)
}
+
func_pointer
gallivm_jit_function(struct gallivm_state *gallivm,
LLVMValueRef func)
@@ -650,9 +647,13 @@ gallivm_jit_function(struct gallivm_state *gallivm,
jit_func = pointer_to_func(code);
if (gallivm_debug & GALLIVM_DEBUG_ASM) {
- lp_disassemble(code);
+ lp_disassemble(func, code);
}
+#if defined(PROFILE)
+ lp_profile(func, code);
+#endif
+
/* Free the function body to save memory */
lp_func_delete_body(func);