Am 06.05.2016 um 21:51 schrieb Rowley, Timothy O:
> Would like to get this small change reviewed to help with performance 
> measuring.
> 
> Thanks.
> 
> -Tim
> 
>> On Mar 28, 2016, at 2:29 PM, Rowley, Timothy O <timothy.o.row...@intel.com> 
>> wrote:
>>
>> LLVM when configured with "intel jitevents" enabled can inform
>> VTune about dynamic code, so individual shaders are attributed
>> profiling data and the resulting assembly can be examined.
>> ---
>> src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 
>> b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> index 30ef37c..f9bb92d 100644
>> --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> @@ -81,6 +81,11 @@
>> #include <llvm/IR/Module.h>
>> #include <llvm/Support/CBindingWrapping.h>
>>
>> +#include <llvm/Config/llvm-config.h>
>> +#if LLVM_USE_INTEL_JITEVENTS
>> +#include <llvm/ExecutionEngine/JITEventListener.h>
>> +#endif
>> +
>> // Workaround http://llvm.org/PR23628
>> #if HAVE_LLVM >= 0x0307
>> #  pragma pop_macro("DEBUG")
>> @@ -625,6 +630,10 @@ 
>> lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
>>    ExecutionEngine *JIT;
>>
>>    JIT = builder.create();
>> +#if LLVM_USE_INTEL_JITEVENTS
>> +   JITEventListener *JEL = JITEventListener::createIntelJITEventListener();
>> +   JIT->RegisterJITEventListener(JEL);
>> +#endif
>>    if (JIT) {
>>       *OutJIT = wrap(JIT);
>>       return 0;
>> -- 
>> 1.9.1
>>
> 

I know nothing about how that interface works, but looks reasonable
enough to me.
Acked-by: Roland Scheidegger <srol...@vmware.com>

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to