adds additional functionality by fetching delay information

This commit is contained in:
2022-02-11 11:28:00 +01:00
parent b8fa5fbbda
commit 4c363f4073
6 changed files with 119 additions and 40 deletions

View File

@ -52,6 +52,18 @@ class cov : public iss::vm_plugin {
size_t not_taken_delay;
size_t taken_delay;
};
BEGIN_BF_DECL(instr_desc, uint32_t)
BF_FIELD(taken, 24, 8)
BF_FIELD(not_taken, 16, 8)
BF_FIELD(is_branch, 8, 8)
BF_FIELD(size, 0, 8)
instr_desc(uint32_t size, uint32_t taken, uint32_t not_taken, bool branch): instr_desc() {
this->size=size;
this->taken=taken;
this->not_taken=not_taken;
this->is_branch=branch;
}
END_BF_DECL();
public:
@ -59,7 +71,7 @@ public:
cov(const cov &&) = delete;
cov();
cov(std::string const &);
virtual ~cov();
@ -75,8 +87,10 @@ public:
private:
iss::instrumentation_if *instr_if {nullptr};
int counter {0};
std::ofstream output;
std::string filename;
std::vector<instr_desc> delays;
};
}
}