ecos: save experiment runtime
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1927 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -354,14 +354,16 @@ bool EcosKernelTestCampaign::run()
|
||||
add_result(res->msg.variant(), res->msg.benchmark(), res->msg.instr1_offset(),
|
||||
res->msg.instr2_offset(), res->msg.instr2_address(), res->msg.mem_addr(),
|
||||
first_bit, bit_width, prev_singleres->resulttype(), prev_singleres->ecos_test_result(),
|
||||
prev_singleres->latest_ip(), prev_singleres->error_corrected(), prev_singleres->details());
|
||||
prev_singleres->latest_ip(), prev_singleres->error_corrected(), prev_singleres->details(),
|
||||
res->msg.runtime() * bit_width / 8.0);
|
||||
first_bit = cur_singleres->bit_offset();
|
||||
bit_width = 1;
|
||||
}
|
||||
add_result(res->msg.variant(), res->msg.benchmark(), res->msg.instr1_offset(),
|
||||
res->msg.instr2_offset(), res->msg.instr2_address(), res->msg.mem_addr(),
|
||||
first_bit, bit_width, prev_singleres->resulttype(), prev_singleres->ecos_test_result(),
|
||||
prev_singleres->latest_ip(), prev_singleres->error_corrected(), prev_singleres->details());
|
||||
prev_singleres->latest_ip(), prev_singleres->error_corrected(), prev_singleres->details(),
|
||||
res->msg.runtime() * bit_width / 8.0);
|
||||
delete res;
|
||||
}
|
||||
finalize_results();
|
||||
@ -412,7 +414,8 @@ bool EcosKernelTestCampaign::add_known_ec(const std::string& variant, const std:
|
||||
1, // ecos_test_result
|
||||
99, // latest_ip
|
||||
0, // error_corrected
|
||||
"" // details
|
||||
"", // details
|
||||
0 // runtime
|
||||
);
|
||||
#endif
|
||||
return true;
|
||||
@ -466,7 +469,7 @@ bool EcosKernelTestCampaign::init_results()
|
||||
resultstream << "variant\tbenchmark\tec_instr1\tec_instr2\t"
|
||||
"ec_instr2_absolute\tec_data_address\tbitnr\tbit_width\t"
|
||||
"resulttype\tecos_test_result\tlatest_ip\t"
|
||||
"error_corrected\tdetails" << endl;
|
||||
"error_corrected\tdetails\truntime" << endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -495,7 +498,7 @@ bool EcosKernelTestCampaign::check_available(const std::string& variant, const s
|
||||
void EcosKernelTestCampaign::add_result(const std::string& variant, const std::string& benchmark,
|
||||
int instr1, int instr2, address_t instr2_absolute, address_t ec_data_address,
|
||||
int bitnr, int bit_width, int resulttype, int ecos_test_result, address_t latest_ip,
|
||||
int error_corrected, const std::string& details)
|
||||
int error_corrected, const std::string& details, float runtime)
|
||||
{
|
||||
resultstream << hex
|
||||
<< variant << "\t"
|
||||
@ -510,7 +513,8 @@ void EcosKernelTestCampaign::add_result(const std::string& variant, const std::s
|
||||
<< ecos_test_result << "\t"
|
||||
<< latest_ip << "\t"
|
||||
<< error_corrected << "\t"
|
||||
<< details << "\n";
|
||||
<< details << "\t"
|
||||
<< runtime << "\n";
|
||||
//resultstream.flush(); // for debugging purposes
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ class EcosKernelTestCampaign : public fail::Campaign {
|
||||
void add_result(const std::string& variant, const std::string& benchmark,
|
||||
int instr1, int instr2, fail::address_t instr2_absolute, fail::address_t ec_data_address,
|
||||
int bitnr, int bit_width, int resulttype, int ecos_test_result, fail::address_t latest_ip,
|
||||
int error_corrected, const std::string& details);
|
||||
int error_corrected, const std::string& details, float runtime);
|
||||
void finalize_results();
|
||||
bool check_available(const std::string& variant, const std::string& benchmark, fail::address_t data_address, int instr2);
|
||||
std::ofstream resultstream;
|
||||
|
||||
@ -59,4 +59,7 @@ message EcosKernelTestProtoMsg {
|
||||
// optional textual description of what happened
|
||||
optional string details = 7;
|
||||
}
|
||||
|
||||
// aggregated runtime for this job (FIXME: this should be part of the basic campaign communication instead)
|
||||
optional float runtime = 9;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "sal/bochs/BochsListener.hpp"
|
||||
#include "sal/Listener.hpp"
|
||||
#include "util/ElfReader.hpp"
|
||||
#include "util/WallclockTimer.hpp"
|
||||
|
||||
// You need to have the tracing plugin enabled for this
|
||||
#include "../plugins/tracing/TracingPlugin.hpp"
|
||||
@ -260,6 +261,9 @@ bool EcosKernelTestExperiment::faultInjection() {
|
||||
param.msg.set_mem_addr(44540);
|
||||
#endif
|
||||
|
||||
WallclockTimer timer;
|
||||
timer.startTimer();
|
||||
|
||||
int id = param.getWorkloadID();
|
||||
m_variant = param.msg.variant();
|
||||
m_benchmark = param.msg.benchmark();
|
||||
@ -500,6 +504,7 @@ bool EcosKernelTestExperiment::faultInjection() {
|
||||
if (param.msg.result_size() != 8) {
|
||||
log << "WTF? param.msg.result_size() != 8" << endl;
|
||||
} else {
|
||||
param.msg.set_runtime(timer);
|
||||
#if !LOCAL
|
||||
m_jc.sendResult(param);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user