#include <pthread.h>
#include <unistd.h>
#include <dlfcn.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <fcntl.h>
#include <ucontext.h>
#include <execinfo.h>
#include "SimpleProfiler.h"
#include "ProfParse.h"
#include <fstream>
Go to the source code of this file.
Namespaces | |
INSTR | |
Macros | |
#define | _POSIX_C_SOURCE 199309 |
#define | DODEBUG if(0) std::cerr |
#define | getBP(X) asm ( "movl %%ebp,%0" : "=m" (X) ) |
#define | getSP(X) asm ( "movl %%esp,%0" : "=m" (X) ) |
#define | MUST_BE_ZERO(fun) if((fun) != 0) { perror("function failed"); abort(); } |
Typedefs | |
typedef unsigned char | INSTR::byte |
Functions | |
void | sigFunc (int, siginfo_t *, void *) |
int | stacktrace (void *addresses[], int nmax) |
Variables | |
int const | REG_EBP = 6 |
int const | REG_EIP = 14 |
int const | REG_ESP = 7 |
byte const | INSTR::RET = 0xc3 |
#define _POSIX_C_SOURCE 199309 |
Definition at line 3 of file SimpleProfiler.cc.
#define DODEBUG if(0) std::cerr |
Definition at line 71 of file SimpleProfiler.cc.
Definition at line 65 of file SimpleProfiler.cc.
Referenced by stacktrace().
Definition at line 66 of file SimpleProfiler.cc.
Referenced by stacktrace().
#define MUST_BE_ZERO | ( | fun | ) | if((fun) != 0) { perror("function failed"); abort(); } |
Definition at line 64 of file SimpleProfiler.cc.
void sigFunc | ( | int | , |
siginfo_t * | , | ||
void * | |||
) |
Definition at line 326 of file SimpleProfiler.cc.
References SimpleProfiler::commitFrame(), SimpleProfiler::instance(), stacktrace(), SimpleProfiler::tempStack(), and SimpleProfiler::tempStackSize().
int stacktrace | ( | void * | addresses[], |
int | nmax | ||
) |
Definition at line 207 of file SimpleProfiler.cc.
References evf::utils::eip, evf::utils::esp, getBP, getSP, info, REG_EBP, and REG_EIP.
Referenced by evf::FUEventProcessor::handleSignalSlave(), and sigFunc().
int const REG_EBP = 6 |
Definition at line 76 of file SimpleProfiler.cc.
Referenced by stacktrace().
int const REG_EIP = 14 |
Definition at line 75 of file SimpleProfiler.cc.
Referenced by stacktrace().
int const REG_ESP = 7 |
Definition at line 77 of file SimpleProfiler.cc.