Changeset 566fde0 for benchmark/readyQ
- Timestamp:
- Jun 25, 2020, 2:31:49 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- cb85603
- Parents:
- 69fbc61
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/yield.cfa
r69fbc61 r566fde0 13 13 #include <clock.hfa> 14 14 #include <time.hfa> 15 #include <stats.hfa> 15 16 16 17 #include "../benchcltr.hfa" … … 45 46 int nprocs = 1; 46 47 int nthreads = 1; 47 48 48 bool silent = false; 49 bool procstats = false; 49 50 50 51 for(;;) { … … 53 54 {"nprocs", required_argument, 0, 'p'}, 54 55 {"nthreads", required_argument, 0, 't'}, 56 {"nostats", no_argument , 0, 'S'}, 57 {"procstat", no_argument , 0, 'P'}, 55 58 {0, 0, 0, 0} 56 59 }; 57 60 58 61 int idx = 0; 59 int opt = getopt_long(argc, argv, "d:p:t: ", options, &idx);62 int opt = getopt_long(argc, argv, "d:p:t:SP", options, &idx); 60 63 61 64 char * arg = optarg ? optarg : ""; … … 87 90 } 88 91 break; 92 case 'S': 93 silent = true; 94 break; 95 case 'P': 96 procstats = true; 97 break; 89 98 // Other cases 90 99 default: /* ? */ … … 96 105 fprintf( stderr, " -t, --nthreads=NTHREADS Number of kernel threads\n" ); 97 106 fprintf( stderr, " -q, --nqueues=NQUEUES Number of queues per threads\n" ); 107 fprintf( stderr, " -S, --nostats Don't print cluster stats\n" ); 108 fprintf( stderr, " -P, --procstat Print processor stats" ); 98 109 exit(1); 99 110 } … … 107 118 BenchCluster cl = { 0 }; 108 119 #if !defined(__CFA_NO_STATISTICS__) 109 print_stats_at_exit( cl.self ); 120 if( !silent ) { 121 print_stats_at_exit( cl.self, CFA_STATS_READY_Q ); 122 } 110 123 #endif 111 124 { 112 125 BenchProc procs[nprocs]; 113 126 #if !defined(__CFA_NO_STATISTICS__) 114 for(i; nprocs) { 115 print_stats_at_exit( procs[i].self ); 127 if( procstats ) { 128 for(i; nprocs) { 129 print_stats_at_exit( procs[i].self, CFA_STATS_READY_Q ); 130 } 116 131 } 117 132 #endif
Note: See TracChangeset
for help on using the changeset viewer.