checksum-oostubs: tell the outside world what job we're working on

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1047 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-04-11 01:00:20 +00:00
parent 60440de13a
commit 00a93f5593

View File

@ -1,5 +1,9 @@
#include <iostream>
// getpid
#include <sys/types.h>
#include <unistd.h>
#include "util/Logger.hpp"
#include "experiment.hpp"
@ -131,6 +135,13 @@ bool ChecksumOOStuBSExperiment::run()
int bit_offset = param.msg.bit_offset();
log << "job " << id << " instr " << instr_offset << " mem " << mem_addr << "+" << bit_offset << endl;
// XXX debug
std::stringstream fname;
fname << "job." << ::getpid();
std::ofstream job(fname.str().c_str());
job << "job " << id << " instr " << instr_offset << " (" << param.msg.instr_address() << ") mem " << mem_addr << "+" << bit_offset << endl;
job.close();
// reaching finish() could happen before OR after FI
fi::BPEvent func_finish(OOSTUBS_FUNC_FINISH);
sal::simulator.addEvent(&func_finish);