import-trace: reorder functionality in importer

BasicImporter is renamed to MemoryImporter. An alias for BasicImporter
in the cmdline interface will remain. The MemoryImporter does now only
handle memory and IP events. The simulation time, dynamic instruction
count and handling of open ECs is moved to Importer.

Change-Id: I04eb0fd4b52fbf5b0ca9ab97778a62130cb626ee
This commit is contained in:
Christian Dietrich
2013-06-06 13:16:43 +02:00
parent 81fe0ea628
commit be8d5edbc3
8 changed files with 313 additions and 237 deletions

View File

@ -9,7 +9,7 @@
#include <fstream>
#include <string>
#include "BasicImporter.hpp"
#include "MemoryImporter.hpp"
using namespace fail;
@ -74,7 +74,7 @@ int main(int argc, char *argv[]) {
"-b/--benchmark \tBenchmark label (default: \"none\")\n");
CommandLine::option_handle IMPORTER =
cmd.addOption("i", "importer", Arg::Required,
"-i/--importer \tWhich import method to use (default: BasicImporter)");
"-i/--importer \tWhich import method to use (default: MemoryImporter)");
CommandLine::option_handle IMPORTER_ARGS =
cmd.addOption("I", "importer-args", Arg::Required,
"-I/--importer-args \tWhich import method to use (default: "")");
@ -114,17 +114,17 @@ int main(int argc, char *argv[]) {
if (cmd[IMPORTER].count() > 0) {
std::string imp(cmd[IMPORTER].first()->arg);
if (imp == "BasicImporter") {
LOG << "Using BasicImporter" << endl;
importer = new BasicImporter();
if (imp == "BasicImporter" || imp == "MemoryImporter") {
LOG << "Using MemoryImporter" << endl;
importer = new MemoryImporter();
} else {
LOG << "Unkown import method: " << imp << endl;
exit(-1);
}
} else {
LOG << "Using BasicImporter" << endl;
importer = new BasicImporter();
LOG << "Using MemoryImporter" << endl;
importer = new MemoryImporter();
}
if (cmd[HELP]) {