Adapted plugin behavior obeying availabiltiy of instrumentation
interface and updated CMake files
This commit is contained in:
		| @@ -30,6 +30,8 @@ if(GIT_FOUND) | ||||
|     set (VCS_REVISION ${GIT_SHA1}) | ||||
| endif() | ||||
|  | ||||
| conan_basic_setup() | ||||
|  | ||||
| # This line finds the boost lib and headers.  | ||||
| set(Boost_NO_BOOST_CMAKE ON) #  Don't do a find_package in config mode before searching for a regular boost install. | ||||
| find_package(Boost COMPONENTS program_options system thread REQUIRED) | ||||
|   | ||||
| @@ -60,6 +60,7 @@ iss::plugin::cycle_estimate::~cycle_estimate() { | ||||
|  | ||||
| bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if& vm) { | ||||
| 	arch_instr = vm.get_arch()->get_instrumentation_if(); | ||||
| 	if(!arch_instr) return false; | ||||
| 	const std::string  core_name = arch_instr->core_type_name(); | ||||
|     Json::Value &val = root[core_name]; | ||||
|     if(val.isArray()){ | ||||
| @@ -77,9 +78,11 @@ bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if& | ||||
|     	} | ||||
|     } | ||||
| 	return true; | ||||
|  | ||||
| } | ||||
|  | ||||
| void iss::plugin::cycle_estimate::callback(instr_info_t instr_info) { | ||||
|     assert(arch_instr && "No instrumentation interface available but callback executed"); | ||||
| 	auto entry = delays[instr_info.instr_id]; | ||||
| 	bool taken = (arch_instr->get_next_pc()-arch_instr->get_pc()) != (entry.size/8); | ||||
| 	if(taken && entry.taken > 1 ) // 1 is the default increment per instruction | ||||
|   | ||||
| @@ -64,7 +64,9 @@ iss::plugin::instruction_count::~instruction_count() { | ||||
| } | ||||
|  | ||||
| bool iss::plugin::instruction_count::registration(const char* const version, vm_if& vm) { | ||||
| 	const std::string  core_name = vm.get_arch()->get_instrumentation_if()->core_type_name(); | ||||
|     auto instr_if = vm.get_arch()->get_instrumentation_if(); | ||||
|     if(!instr_if) return false; | ||||
| 	const std::string  core_name = instr_if->core_type_name(); | ||||
|     Json::Value &val = root[core_name]; | ||||
|     if(val.isArray()){ | ||||
|     	delays.reserve(val.size()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user