Added BasicBlock- and CallRegionPruner
Implemented two instantiations of Fault-Space Regions (FSR) as a program-structure-guided approximation of fault spaces based on the precise Def/Use-Pruning using basic blocks or function calls. Further reading: Program-Structure-Guided Approximation of Large Fault Spaces Oskar Pusz and Daniel Kiechle and Christian Dietrich and Daniel Lohmann In: 24th Pacific Rim International Symposium on Dependable Computing (PRDC'19) IEEE Computer Science Press, 2019 Some configurations for bochs and generic-experiment
This commit is contained in:
35
tools/prune-trace/CallRegionPruner.hpp
Normal file
35
tools/prune-trace/CallRegionPruner.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef __CALL_REGION_PRUNER_H__
|
||||
#define __CALL_REGION_PRUNER_H__
|
||||
|
||||
#include "BasicBlockPruner.hpp"
|
||||
#include <list>
|
||||
#include "util/ProtoStream.hpp"
|
||||
#include "util/gzstream/gzstream.h"
|
||||
#include "comm/TracePlugin.pb.h"
|
||||
#include "sal/SALConfig.hpp"
|
||||
#include <tuple>
|
||||
#include <string>
|
||||
|
||||
class CallRegionPruner : public BasicBlockPruner {
|
||||
public:
|
||||
CallRegionPruner() : BasicBlockPruner() {
|
||||
LOG.setDescription("CallRegionPruner");
|
||||
}
|
||||
virtual ~CallRegionPruner() {};
|
||||
|
||||
virtual std::string method_name() { return std::string("call-region"); }
|
||||
void getAliases(std::deque<std::string> *aliases) {
|
||||
aliases->push_back("CallRegionPruner");
|
||||
aliases->push_back("call-region");
|
||||
}
|
||||
|
||||
protected:
|
||||
/* Import objectdump to find jumps */
|
||||
virtual bool importObjdump(const variant_t &variant);
|
||||
|
||||
// list of instructions: PC -> is a call or ret instruction
|
||||
std::set<static_instr_t> call_or_ret;
|
||||
|
||||
virtual bool inSameRegion(static_instr_t previous, static_instr_t next);
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user