prune-trace: use uint64_t for pilot counts
This enables using very large data sets in the FESamplingPruner. Change-Id: Ibf097ed8cec24c85a74e83a78d79aa07893cfa8c
This commit is contained in:
committed by
Horst Schirmeier
parent
ed18399ff6
commit
f23860c139
@ -93,7 +93,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant)
|
|||||||
MYSQL_RES *res;
|
MYSQL_RES *res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
unsigned pilotcount = 0, samplerows;
|
uint64_t pilotcount = 0, samplerows;
|
||||||
|
|
||||||
if (!m_use_known_results) {
|
if (!m_use_known_results) {
|
||||||
LOG << "loading trace entries for " << variant.variant << "/" << variant.benchmark << " ..." << endl;
|
LOG << "loading trace entries for " << variant.variant << "/" << variant.benchmark << " ..." << endl;
|
||||||
@ -149,7 +149,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant)
|
|||||||
LOG << "loaded " << pilotcount << " entries, sampling "
|
LOG << "loaded " << pilotcount << " entries, sampling "
|
||||||
<< samplerows << " entries with fault expansion ..." << endl;
|
<< samplerows << " entries with fault expansion ..." << endl;
|
||||||
|
|
||||||
unsigned num_fspgroup_entries = 0;
|
uint64_t num_fspgroup_entries = 0;
|
||||||
uint32_t known_pilot_method_id = m_method_id;
|
uint32_t known_pilot_method_id = m_method_id;
|
||||||
|
|
||||||
if (!m_use_known_results) {
|
if (!m_use_known_results) {
|
||||||
@ -159,7 +159,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant)
|
|||||||
std::string insert_sql(ss.str());
|
std::string insert_sql(ss.str());
|
||||||
ss.str("");
|
ss.str("");
|
||||||
|
|
||||||
for (unsigned i = 0; i < samplerows; ++i) {
|
for (uint64_t i = 0; i < samplerows; ++i) {
|
||||||
uint64_t pos = my_rand(pop.get_size() - 1);
|
uint64_t pos = my_rand(pop.get_size() - 1);
|
||||||
Pilot p = pop.get(pos);
|
Pilot p = pop.get(pos);
|
||||||
ss << "(0," << variant.id << "," << p.instr2 << "," << p.instr2
|
ss << "(0," << variant.id << "," << p.instr2 << "," << p.instr2
|
||||||
@ -170,7 +170,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant)
|
|||||||
}
|
}
|
||||||
db->insert_multiple();
|
db->insert_multiple();
|
||||||
|
|
||||||
unsigned num_fsppilot_entries = samplerows;
|
uint64_t num_fsppilot_entries = samplerows;
|
||||||
|
|
||||||
// single entry for known outcome (write access)
|
// single entry for known outcome (write access)
|
||||||
ss << "INSERT INTO fsppilot (known_outcome, variant_id, instr2, injection_instr, injection_instr_absolute, data_address, data_width, fspmethod_id) "
|
ss << "INSERT INTO fsppilot (known_outcome, variant_id, instr2, injection_instr, injection_instr_absolute, data_address, data_width, fspmethod_id) "
|
||||||
@ -201,7 +201,7 @@ bool FESamplingPruner::sampling_prune(const fail::Database::Variant& variant)
|
|||||||
std::string insert_sql(ss.str());
|
std::string insert_sql(ss.str());
|
||||||
ss.str("");
|
ss.str("");
|
||||||
|
|
||||||
for (unsigned i = 0; i < samplerows; ++i) {
|
for (uint64_t i = 0; i < samplerows; ++i) {
|
||||||
uint64_t pos = my_rand(pop.get_size() - 1);
|
uint64_t pos = my_rand(pop.get_size() - 1);
|
||||||
Pilot p = pop.get(pos);
|
Pilot p = pop.get(pos);
|
||||||
ss << "(" << variant.id << "," << p.instr2
|
ss << "(" << variant.id << "," << p.instr2
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#ifndef __FESAMPLING_PRUNER_H__
|
#ifndef __FESAMPLING_PRUNER_H__
|
||||||
#define __FESAMPLING_PRUNER_H__
|
#define __FESAMPLING_PRUNER_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include "Pruner.hpp"
|
#include "Pruner.hpp"
|
||||||
#include "util/CommandLine.hpp"
|
#include "util/CommandLine.hpp"
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ class FESamplingPruner : public Pruner {
|
|||||||
fail::CommandLine::option_handle USE_KNOWN_RESULTS;
|
fail::CommandLine::option_handle USE_KNOWN_RESULTS;
|
||||||
fail::CommandLine::option_handle NO_WEIGHTING;
|
fail::CommandLine::option_handle NO_WEIGHTING;
|
||||||
|
|
||||||
unsigned m_samplesize;
|
uint64_t m_samplesize;
|
||||||
bool m_use_known_results, m_weighting;
|
bool m_use_known_results, m_weighting;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user