[llvm] r241372 - Fix build with -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_USE_OPROFILE=ON.
Philip Reames
listmail at philipreames.com
Fri Jul 3 21:44:48 PDT 2015
On 07/03/2015 02:47 PM, Rafael Espindola wrote:
> Author: rafael
> Date: Fri Jul 3 16:47:00 2015
> New Revision: 241372
>
> URL: http://llvm.org/viewvc/llvm-project?rev=241372&view=rev
> Log:
> Fix build with -DLLVM_USE_INTEL_JITEVENTS=ON -DLLVM_USE_OPROFILE=ON.
>
> Is anyone using those?
I've considered using oprofile, but never actually got it working.
>
> Modified:
> llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
> llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp
> llvm/trunk/tools/llvm-jitlistener/CMakeLists.txt
>
> Modified: llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp?rev=241372&r1=241371&r2=241372&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Fri Jul 3 16:47:00 2015
> @@ -118,9 +118,10 @@ void IntelJITEventListener::NotifyObject
> if (!Name)
> continue;
>
> - uint64_t Addr;
> - if (Sym.getAddress(Addr))
> + ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
> + if (AddrOrErr.getError())
> continue;
> + uint64_t Addr = *AddrOrErr;
> uint64_t Size = P.second;
>
> // Record this address in a local vector
>
> Modified: llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp?rev=241372&r1=241371&r2=241372&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp Fri Jul 3 16:47:00 2015
> @@ -89,12 +89,14 @@ void OProfileJITEventListener::NotifyObj
> for (const std::pair<SymbolRef, uint64_t> &P : computeSymbolSizes(DebugObj)) {
> SymbolRef Sym = P.first;
> if (Sym.getType() == SymbolRef::ST_Function) {
> - StringRef Name;
> - uint64_t Addr;
> - if (Sym.getName(Name))
> + ErrorOr<StringRef> NameOrErr = Sym.getName();
> + if (NameOrErr.getError())
> continue;
> - if (Sym.getAddress(Addr))
> + StringRef Name = *NameOrErr;
> + ErrorOr<uint64_t> AddrOrErr = Sym.getAddress();
> + if (AddrOrErr.getError())
> continue;
> + uint64_t Addr = *AddrOrErr;
> uint64_t Size = P.second;
>
> if (Wrapper->op_write_native_code(Name.data(), Addr, (void*)Addr, Size)
> @@ -126,8 +128,10 @@ void OProfileJITEventListener::NotifyFre
> E = DebugObj.symbol_end();
> I != E; ++I) {
> if (I->getType() == SymbolRef::ST_Function) {
> - uint64_t Addr;
> - if (I->getAddress(Addr)) continue;
> + ErrorOr<uint64_t> AddrOrErr = I->getAddress();
> + if (AddrOrErr.getError())
> + continue;
> + uint64_t Addr = *AddrOrErr;
>
> if (Wrapper->op_unload_native_code(Addr) == -1) {
> DEBUG(dbgs()
>
> Modified: llvm/trunk/tools/llvm-jitlistener/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-jitlistener/CMakeLists.txt?rev=241372&r1=241371&r2=241372&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-jitlistener/CMakeLists.txt (original)
> +++ llvm/trunk/tools/llvm-jitlistener/CMakeLists.txt Fri Jul 3 16:47:00 2015
> @@ -6,7 +6,7 @@ include_directories( ${LLVM_INTEL_JITEVE
> set(LLVM_LINK_COMPONENTS
> asmparser
> bitreader
> - debuginfo
> + DebugInfoDWARF
> inteljitevents
> interpreter
> irreader
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list