import-trace: add --cover-memorymap switch

This compatibility-breaking change introduces the --cover-memorymap
switch to import-trace.  It makes a previous behavior optional, which
enforces DB entries for addresses covered by the --memorymap that
don't occur in the trace.  This creates a continuous and potentially
very large fault space in the DB, which never made any real sense.

Change-Id: I47e412bb621b595748c1772e02d2577308be8664
This commit is contained in:
Horst Schirmeier
2021-03-28 08:52:34 +02:00
parent 6598520c0a
commit 3b7404de43
3 changed files with 13 additions and 5 deletions

View File

@ -27,6 +27,7 @@ protected:
bool m_sanitychecks;
bool m_import_write_ecs;
bool m_extended_trace;
bool m_cover_memorymap;
fail::Database *db;
fail::Architecture m_arch;
fail::UniformRegisterSet *m_extended_trace_regs;
@ -120,7 +121,8 @@ protected:
bool sanitycheck(std::string check_name, std::string fail_msg, std::string sql);
public:
Importer() : m_variant_id(0), m_elf(NULL), m_mm(NULL), m_faultspace_rightmargin('W'),
m_sanitychecks(false), m_import_write_ecs(true), m_extended_trace(false), db(NULL),
m_sanitychecks(false), m_import_write_ecs(true), m_extended_trace(false),
m_cover_memorymap(false), db(NULL),
m_extended_trace_regs(NULL), m_row_count(0), m_time_trace_start(0),
m_last_ip(0), m_last_instr(0), m_last_time(0) {}
bool init(const std::string &variant, const std::string &benchmark, fail::Database *db);
@ -142,6 +144,7 @@ public:
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_cover_memorymap(bool enabled) { m_cover_memorymap = enabled; }
};
#endif