This commit is contained in:
parent
36a338af99
commit
fef3e352be
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
#include "world.h"
|
||||
#include "cache.h"
|
||||
#include "public.h"
|
||||
|
||||
|
|
@ -20,8 +18,18 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
auto cache = new Cache(char *argv[]);
|
||||
|
||||
ifstream trace("../traces/" + p.TraceFile());
|
||||
string line;
|
||||
char op;
|
||||
unsigned addr;
|
||||
while(getline(trace, line) && (istringstream(line) >> op >> hex >> addr)) {
|
||||
cache->useCache(addr, op == 'w');
|
||||
}
|
||||
catch (...)
|
||||
trace.close();
|
||||
}
|
||||
catch (const char* e)
|
||||
{
|
||||
std::cerr << "Caught exception: " << e << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue