prune-trace: use none/none only without any parameters
Before this change, running prune-trace with, e.g. "prune-trace -d fsp_mibench -v bitmap% --benchmark-exclude clockcnv" resulted in an implied "--benchmark none", rendering --benchmark-exclude ineffective and resulting in nothing being pruned. Now, the "none" default only applies when neither --benchmark nor --benchmark-exclude (analogously for --variant / --variant-exclude) is provided. Change-Id: Ic7c88919d7cfde1261749a745dc6a679472ff348
This commit is contained in:
@ -82,8 +82,6 @@ int main(int argc, char *argv[]) {
|
||||
for (option::Option *o = cmd[VARIANT]; o; o = o->next()) {
|
||||
variants.push_back(std::string(o->arg));
|
||||
}
|
||||
} else {
|
||||
variants.push_back(std::string("none"));
|
||||
}
|
||||
|
||||
if (cmd[VARIANT_EXCLUDE]) {
|
||||
@ -92,12 +90,15 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// fallback
|
||||
if (variants.size() == 0 && variants_exclude.size() == 0) {
|
||||
variants.push_back(std::string("none"));
|
||||
}
|
||||
|
||||
if (cmd[BENCHMARK]) {
|
||||
for (option::Option *o = cmd[BENCHMARK]; o; o = o->next()) {
|
||||
benchmarks.push_back(std::string(o->arg));
|
||||
}
|
||||
} else {
|
||||
benchmarks.push_back(std::string("none"));
|
||||
}
|
||||
|
||||
if (cmd[BENCHMARK_EXCLUDE]) {
|
||||
@ -106,6 +107,11 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// fallback
|
||||
if (benchmarks.size() == 0 && benchmarks_exclude.size() == 0) {
|
||||
benchmarks.push_back(std::string("none"));
|
||||
}
|
||||
|
||||
if (!pruner->init(db, variants, variants_exclude, benchmarks, benchmarks_exclude)) {
|
||||
LOG << "pruner->init() failed" << endl;
|
||||
exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user