mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user