From b8f6858fcb762b47ca2ad30efd286bd203042f17 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 17 Apr 2013 13:32:15 +0100 Subject: gallivm: JIT symbol resolution with linux perf. Details on docs/llvmpipe.html Reviewed-by: Brian Paul Reviewed-by: Roland Scheidegger --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_init.c') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 4fa5887e878..1153411dd52 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); -- cgit v1.2.3