@@ -70,12 +70,10 @@ void print_usage(ostream& out) {
70
70
out << " -s STAGE - Stop after the given stage." << endl;
71
71
out << " -s stage1 - Stop after find_structural_bits." << endl;
72
72
out << " -s all - Run all stages." << endl;
73
- out << " -s allfast - Run all stages. " << endl;
73
+ out << " -H - Make the buffers hot (reduce page allocation during parsing) " << endl;
74
74
75
75
out << " -a ARCH - Use the parser with the designated architecture (HASWELL, WESTMERE" << endl;
76
76
out << " or ARM64). By default, detects best supported architecture." << endl;
77
- out << " -o - Estimate the overall speed as stage 1 + stage 2 instead of a rerun of both" << endl;
78
-
79
77
}
80
78
81
79
void exit_usage (string message) {
@@ -95,13 +93,13 @@ struct option_struct {
95
93
96
94
bool verbose = false ;
97
95
bool tabbed_output = false ;
98
- bool rerunbothstages = true ;
96
+ bool hotbuffers = false ;
99
97
100
98
option_struct (int argc, char **argv) {
101
99
#ifndef _MSC_VER
102
100
int c;
103
101
104
- while ((c = getopt (argc, argv, " vtn:i:a:s:" )) != -1 ) {
102
+ while ((c = getopt (argc, argv, " vtn:i:a:s:H " )) != -1 ) {
105
103
switch (c) {
106
104
case ' n' :
107
105
iterations = atoi (optarg );
@@ -121,15 +119,14 @@ struct option_struct {
121
119
exit_usage (string (" Unsupported option value -a " ) + optarg + " : expected -a HASWELL, WESTMERE or ARM64" );
122
120
}
123
121
break ;
122
+ case ' H' :
123
+ hotbuffers = true ;
124
+ break ;
124
125
case ' s' :
125
126
if (!strcmp (optarg , " stage1" )) {
126
127
stage1_only = true ;
127
128
} else if (!strcmp (optarg , " all" )) {
128
129
stage1_only = false ;
129
- rerunbothstages = true ; // for safety
130
- } else if (!strcmp (optarg , " allfast" )) {
131
- stage1_only = false ;
132
- rerunbothstages = false ;
133
130
} else {
134
131
exit_usage (string (" Unsupported option value -s " ) + optarg + " : expected -s stage1 or all" );
135
132
}
@@ -204,7 +201,7 @@ int main(int argc, char *argv[]) {
204
201
// Benchmark each file once per iteration
205
202
for (size_t f=0 ; f<options.files .size (); f++) {
206
203
verbose () << " [verbose] " << benchmarkers[f]->filename << " iterations #" << iteration << " -" << (iteration+options.iteration_step -1 ) << endl;
207
- benchmarkers[f]->run_iterations (options.iteration_step , true , false );
204
+ benchmarkers[f]->run_iterations (options.iteration_step , true , options. hotbuffers );
208
205
}
209
206
}
210
207
} else {
@@ -213,7 +210,7 @@ int main(int argc, char *argv[]) {
213
210
// Benchmark each file once per iteration
214
211
for (size_t f=0 ; f<options.files .size (); f++) {
215
212
verbose () << " [verbose] " << benchmarkers[f]->filename << " iterations #" << iteration << " -" << (iteration+options.iteration_step -1 ) << endl;
216
- benchmarkers[f]->run_iterations (options.iteration_step , false , options.rerunbothstages );
213
+ benchmarkers[f]->run_iterations (options.iteration_step , false , options.hotbuffers );
217
214
}
218
215
}
219
216
}
0 commit comments