import-trace: add --no-write-ecs switch
If you only need raw failure counts, no-effect write equivalence classes are redundant and only slow down access to the trace and fspgroup tables. This switch prevents any accesstype='W' entries from finding their way into the trace table. Change-Id: Ifb415994063a2107769bc80ebd2fd780de5a4dda
This commit is contained in:
@ -249,6 +249,10 @@ bool Importer::add_trace_event(margin_info_t &begin, margin_info_t &end,
|
|||||||
|
|
||||||
bool Importer::add_trace_event(margin_info_t &begin, margin_info_t &end,
|
bool Importer::add_trace_event(margin_info_t &begin, margin_info_t &end,
|
||||||
Trace_Event &event, bool is_fake) {
|
Trace_Event &event, bool is_fake) {
|
||||||
|
if (!m_import_write_ecs && event.accesstype() == event.WRITE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// insert extended trace info if configured and available
|
// insert extended trace info if configured and available
|
||||||
bool extended = m_extended_trace && event.has_trace_ext();
|
bool extended = m_extended_trace && event.has_trace_ext();
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ protected:
|
|||||||
fail::MemoryMap *m_mm;
|
fail::MemoryMap *m_mm;
|
||||||
char m_faultspace_rightmargin;
|
char m_faultspace_rightmargin;
|
||||||
bool m_sanitychecks;
|
bool m_sanitychecks;
|
||||||
|
bool m_import_write_ecs;
|
||||||
bool m_extended_trace;
|
bool m_extended_trace;
|
||||||
fail::Database *db;
|
fail::Database *db;
|
||||||
fail::Architecture m_arch;
|
fail::Architecture m_arch;
|
||||||
@ -111,7 +112,7 @@ protected:
|
|||||||
virtual bool trace_end_reached() { return true; }
|
virtual bool trace_end_reached() { return true; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Importer() : m_sanitychecks(false), m_extended_trace(false), m_row_count(0), m_time_trace_start(0) {}
|
Importer() : m_sanitychecks(false), m_import_write_ecs(true), m_extended_trace(false), m_row_count(0), m_time_trace_start(0) {}
|
||||||
bool init(const std::string &variant, const std::string &benchmark, fail::Database *db);
|
bool init(const std::string &variant, const std::string &benchmark, fail::Database *db);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,6 +130,7 @@ public:
|
|||||||
void set_memorymap(fail::MemoryMap *mm) { m_mm = mm; }
|
void set_memorymap(fail::MemoryMap *mm) { m_mm = mm; }
|
||||||
void set_faultspace_rightmargin(char accesstype) { m_faultspace_rightmargin = accesstype; }
|
void set_faultspace_rightmargin(char accesstype) { m_faultspace_rightmargin = accesstype; }
|
||||||
void set_sanitychecks(bool enabled) { m_sanitychecks = enabled; }
|
void set_sanitychecks(bool enabled) { m_sanitychecks = enabled; }
|
||||||
|
void set_import_write_ecs(bool enabled) { m_import_write_ecs = enabled; }
|
||||||
void set_extended_trace(bool enabled) { m_extended_trace = enabled; }
|
void set_extended_trace(bool enabled) { m_extended_trace = enabled; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -87,6 +87,10 @@ int main(int argc, char *argv[]) {
|
|||||||
CommandLine::option_handle NO_DELETE =
|
CommandLine::option_handle NO_DELETE =
|
||||||
cmd.addOption("", "no-delete", Arg::None,
|
cmd.addOption("", "no-delete", Arg::None,
|
||||||
"--no-delete \tAssume there are no DB entries for this variant/benchmark, don't issue a DELETE");
|
"--no-delete \tAssume there are no DB entries for this variant/benchmark, don't issue a DELETE");
|
||||||
|
CommandLine::option_handle NO_WRITE_ECS =
|
||||||
|
cmd.addOption("", "no-write-ecs", Arg::None,
|
||||||
|
"--no-write-ecs \tDo not import any write ECs into the database; "
|
||||||
|
"results in a perforated fault space and is OK if you only use absolute failure numbers");
|
||||||
CommandLine::option_handle EXTENDED_TRACE =
|
CommandLine::option_handle EXTENDED_TRACE =
|
||||||
cmd.addOption("", "extended-trace", Arg::None,
|
cmd.addOption("", "extended-trace", Arg::None,
|
||||||
"--extended-trace \tImport extended trace information if available");
|
"--extended-trace \tImport extended trace information if available");
|
||||||
@ -214,6 +218,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
importer->set_sanitychecks(cmd[ENABLE_SANITYCHECKS]);
|
importer->set_sanitychecks(cmd[ENABLE_SANITYCHECKS]);
|
||||||
importer->set_extended_trace(cmd[EXTENDED_TRACE]);
|
importer->set_extended_trace(cmd[EXTENDED_TRACE]);
|
||||||
|
importer->set_import_write_ecs(!cmd[NO_WRITE_ECS]);
|
||||||
|
|
||||||
if (!importer->init(variant, benchmark, db)) {
|
if (!importer->init(variant, benchmark, db)) {
|
||||||
LOG << "importer->init() failed" << endl;
|
LOG << "importer->init() failed" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user