void JitBlockCache::Init() { #if defined USE_OPROFILE && USE_OPROFILE agent = op_open_agent(); #endif blocks_ = new JitBlock[MAX_NUM_BLOCKS]; Clear(); }
void bm_Init() { #ifdef DYNA_OPROF oprofHandle=op_open_agent(); if (oprofHandle==0) printf("bm: Failed to opened oprofile\n"); else printf("bm: Oprofile integration enabled !\n"); #endif }
void Init(const std::string& perf_dir) { #if defined USE_OPROFILE && USE_OPROFILE s_agent = op_open_agent(); #endif if (!perf_dir.empty()) { std::string filename = StringFromFormat("%s/perf-%d.map", perf_dir.data(), getpid()); s_perf_map_file.Open(filename, "w"); // Disable buffering in order to avoid missing some mappings // if the event of a crash: std::setvbuf(s_perf_map_file.GetHandle(), nullptr, _IONBF, 0); } }
OprofileJITEventListener() { agent = op_open_agent(); assert(agent); }