Skip to content
Snippets Groups Projects
Commit 9f5a4b1a authored by Bouquillon Fabien's avatar Bouquillon Fabien
Browse files

vul file

parent f83f1043
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -145,8 +145,8 @@ void print_vulnerability(std::vector<struct LBlock_vulnerability*> cf) {
*
********************************/
int main(int argc, char **argv) {
if(argc != 5) {
std::cout << "Error number of argument. Usage:" << argv[0] << " <binary> <flow fact> <output file> <profile.csv>" << std::endl;
if(argc != 4) {
std::cout << "Error number of argument. Usage:" << argv[0] << " <binary> <flow fact> <output file>" << std::endl;
exit(1);
}
......@@ -200,6 +200,21 @@ int main(int argc, char **argv) {
const CFGCollection *coll = INVOLVED_CFGS(ws);
std::vector<struct LBlock_vulnerability*> configuration_vulnerability = List_LB_VUL(ws);
for(int i = 0; i < configuration_vulnerability.size(); i++) {
struct LBlock_vulnerability *lbv = configuration_vulnerability[i];
file << "(" << lbv->addr.page() << ":" << lbv->addr.offset() << ")" << ","
<< lbv->reload_cost << ","
<< lbv->vulnerability_max << ","
<< lbv->vulnerable_data << ":";
file << "(";
for(int j = 0; j < lbv->list_lv_path.size(); j++) {
file << "(" << lbv->list_lv_path[j]->addr.page() << ":" << lbv->list_lv_path[j]->addr.offset() << ")" << " ";
}
file << ")";
file << std::endl;
}
// for(CFGCollection::Iter cfg_iter(*coll); cfg_iter(); cfg_iter++) {
// for(CFG::BlockIter block_iter = cfg_iter->blocks(); block_iter(); block_iter++) {
// if(block_iter->isBasic()) {
......@@ -262,8 +277,8 @@ int main(int argc, char **argv) {
// }
// }
long wcet_vul = WCET_VUL(ws);
std::cout << "WCET_VUL:" << wcet_vul << std::endl;
build_profile_file(argv[4], ws, configuration_vulnerability, wcet);
print_vulnerability(configuration_vulnerability);
//long wcet_vul = WCET_VUL(ws);
//std::cout << "WCET_VUL:" << wcet_vul << std::endl;
//build_profile_file(argv[4], ws, configuration_vulnerability, wcet);
//print_vulnerability(configuration_vulnerability);
}
No preview for this file type
No preview for this file type
......@@ -1482,7 +1482,7 @@ end path exploration
########################
End MISS injection computation
LIST LV:22
vulnerability:3110896 WCET:22056
vulnerability:3123968 WCET:22056
WCET_VUL:31668
configuration size:22
66608:0:33
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment