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 | f2b68f67547b3268d1581af5434303593c7c71a4 (patch) | |
tree | 4b298d9e8290e364a3927bea50f38513517d00e9 /llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp | |
parent | 46a9c9cb1c314d39454a45b8e530b92330afebba (diff) | |
download | bcm5719-llvm-f2b68f67547b3268d1581af5434303593c7c71a4.tar.gz bcm5719-llvm-f2b68f67547b3268d1581af5434303593c7c71a4.zip |
Adding oprofile support for MCJIT.
Patch by Dmitry Stogov
llvm-svn: 192809
Diffstat (limited to 'llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp b/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp index dca48603cfc..61d8dc21dec 100644 --- a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp +++ b/llvm/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; |