? LINUXgcc ? Benchmark.patch ? tests/LINUXgcc Index: Benchmark.cmpl.cpp =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Benchmark.cmpl.cpp,v retrieving revision 1.44 diff -c -p -r1.44 Benchmark.cmpl.cpp *** Benchmark.cmpl.cpp 2000/06/30 02:02:50 1.44 --- Benchmark.cmpl.cpp 2001/07/05 20:13:26 *************** Benchmark::Benchmark(int argc, char *arg *** 76,81 **** --- 76,82 ---- print_m = true; diags_m = true; + report_time_m = false; // Default Inform object has null prefix and only prints from context 0: *************** Benchmark::Benchmark(int argc, char *arg *** 225,230 **** --- 226,236 ---- print_m = false; ++i; } + else if (strcmp("--report-time", argv[i]) == 0) + { + report_time_m = true; + ++i; + } else if (strcmp("--num-patches", argv[i]) == 0) { setNumPatches_m = true; *************** void Benchmark::usage(const char *name) *** 278,284 **** << " V1, V2, etc.\n" << "--no-print.........................don't print anything (useful if\n" << " profiling using an external tool).\n" ! << "--n-idiags.........................suppress diagnostic output.\n" << "--iters N..........................run benchmark for N iterations\n" << " (no effect if using SGI timers).\n" << "--samples N........................repeat runs N time.\n" --- 284,291 ---- << " V1, V2, etc.\n" << "--no-print.........................don't print anything (useful if\n" << " profiling using an external tool).\n" ! << "--no-diags.........................suppress diagnostic output.\n" ! << "--report-time......................print time, not Mflops.\n" << "--iters N..........................run benchmark for N iterations\n" << " (no effect if using SGI timers).\n" << "--samples N........................repeat runs N time.\n" *************** void Benchmark::runImplementation(Implem *** 637,645 **** double timeper = total / double(iters); ! // Compute the MOps and store it. ! times[i] = impl->opCount() / timeper / 1.0e6; // If we're testing results and we're printing, do this now. --- 644,655 ---- double timeper = total / double(iters); ! // Either store the running time or the MOps. ! if (report_time_m) ! times[i] = timeper; ! else ! times[i] = impl->opCount() / timeper / 1.0e6; // If we're testing results and we're printing, do this now. Index: Benchmark.h =================================================================== RCS file: /home/pooma/Repository/r2/src/Utilities/Benchmark.h,v retrieving revision 1.27 diff -c -p -r1.27 Benchmark.h *** Benchmark.h 2000/06/30 02:02:50 1.27 --- Benchmark.h 2001/07/05 20:13:26 *************** private: *** 199,209 **** bool setSamples_m; //--------------------------------------------------------------------------- ! // If true, we are supposed to display results or show diagnostic output. bool print_m; bool diags_m; ! // -------------------------------------------------------------------------- // Points to the Inform object pointer used for printing output: --- 199,211 ---- bool setSamples_m; //--------------------------------------------------------------------------- ! // If true, we are supposed to display results or show diagnostic ! // output or print running time, not Mflops. bool print_m; bool diags_m; ! bool report_time_m; ! // -------------------------------------------------------------------------- // Points to the Inform object pointer used for printing output: