[llvm] e5bdf0f - [MCJIT] Set VMA to code address in PerfJITEventListener.
    Lang Hames via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Apr  2 10:48:12 PDT 2023
    
    
  
Author: Prem Chintalapudi
Date: 2023-04-02T10:32:28-07:00
New Revision: e5bdf0f6d2552541ebab1d2a865f9c4e10ca6724
URL: https://github.com/llvm/llvm-project/commit/e5bdf0f6d2552541ebab1d2a865f9c4e10ca6724
DIFF: https://github.com/llvm/llvm-project/commit/e5bdf0f6d2552541ebab1d2a865f9c4e10ca6724.diff
LOG: [MCJIT] Set VMA to code address in PerfJITEventListener.
VMA should default to CodeAddr, not 0, as specified here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jitdump-specification.txt
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D146496
Added: 
    
Modified: 
    llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
index b425eec5f6d6..62cab22a1c45 100644
--- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
@@ -417,7 +417,7 @@ void PerfJITEventListener::NotifyCode(Expected<llvm::StringRef> &Symbol,
   rec.Prefix.Timestamp = perf_get_timestamp();
 
   rec.CodeSize = CodeSize;
-  rec.Vma = 0;
+  rec.Vma = CodeAddr;
   rec.CodeAddr = CodeAddr;
   rec.Pid = Pid;
   rec.Tid = get_threadid();
        
    
    
More information about the llvm-commits
mailing list