diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-16 16:32:47 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-16 16:32:47 +0000 |
commit | 8a753843617e348279f4a72e5c66bac4932c832b (patch) | |
tree | c6ffe782b93c50685d281a4fa059dd76115e4c05 /lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp | |
parent | 8225b23c6adcb1be605108425b7eb169b6439b64 (diff) | |
download | external_llvm-8a753843617e348279f4a72e5c66bac4932c832b.tar.gz external_llvm-8a753843617e348279f4a72e5c66bac4932c832b.tar.bz2 external_llvm-8a753843617e348279f4a72e5c66bac4932c832b.zip |
Adding oprofile support for MCJIT.
Patch by Dmitry Stogov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp')
-rw-r--r-- | lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp b/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp index dca48603cf..61d8dc21de 100644 --- a/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp +++ b/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp @@ -141,6 +141,10 @@ bool OProfileWrapper::checkForOProfileProcEntry() { close(CmdLineFD); ssize_t Idx = 0; + if (ExeName[0] != '/') { + BaseName = ExeName; + } + // Find the terminator for the first string while (Idx < NumRead-1 && ExeName[Idx] != 0) { Idx++; @@ -159,7 +163,8 @@ bool OProfileWrapper::checkForOProfileProcEntry() { } // Test this to see if it is the oprofile daemon - if (BaseName != 0 && !strcmp("oprofiled", BaseName)) { + if (BaseName != 0 && (!strcmp("oprofiled", BaseName) || + !strcmp("operf", BaseName))) { // If it is, we're done closedir(ProcDir); return true; |