Пример #1
0
void JitBlockCache::Init() {
#if defined USE_OPROFILE && USE_OPROFILE
    agent = op_open_agent();
#endif
    blocks_ = new JitBlock[MAX_NUM_BLOCKS];
    Clear();
}
Пример #2
0
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
}
Пример #3
0
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);
	}
}
Пример #4
0
 OprofileJITEventListener() {
     agent = op_open_agent();
     assert(agent);
 }