diff options
author | José Fonseca <[email protected]> | 2013-04-17 13:32:15 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2013-04-17 16:50:52 +0100 |
commit | b8f6858fcb762b47ca2ad30efd286bd203042f17 (patch) | |
tree | 366c92461157a380530f4de96a5dca5fe3c09b61 /src/gallium/auxiliary/gallivm/lp_bld_init.c | |
parent | 35ef27d485367ffede9f478c9865515814e119b7 (diff) |
gallivm: JIT symbol resolution with linux perf.
Details on docs/llvmpipe.html
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_init.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 11 |
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 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); |