Changeset 26fd986 for benchmark/schedext
- Timestamp:
- Jan 21, 2020, 6:14:34 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 5518719
- Parents:
- c12869e
- Location:
- benchmark/schedext
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified benchmark/schedext/cfa1.cfa ¶
rc12869e r26fd986 6 6 #include "../bench.h" 7 7 8 volatile int go = 0;9 10 8 monitor M {} m1; 11 9 12 10 void __attribute__((noinline)) call( M & mutex p1 ) {} 13 14 11 void __attribute__((noinline)) wait( M & mutex p1 ) { 15 go = 1;16 12 for ( times ) { 17 13 waitfor( call : p1 ); 18 14 } 19 go = 0;20 15 } 21 16 22 17 thread T {}; 23 18 void main( T & ) { 24 while ( go == 0 ) { yield(); }25 19 BENCH( 26 while ( go == 1) { call( m1 ); },20 for ( times ) { call( m1 ); }, 27 21 result 28 22 ) -
TabularUnified benchmark/schedext/cfa2.cfa ¶
rc12869e r26fd986 4 4 #include <stdio.h> 5 5 6 #include "bench.h" 7 8 volatile int go = 0; 6 #include "../bench.h" 9 7 10 8 monitor M {} m1, m2; 11 9 12 10 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {} 13 14 11 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) { 15 go = 1;16 12 for ( times ) { 17 13 waitfor( call : p1, p2 ); 18 14 } 19 go = 0;20 15 } 21 22 16 thread T {}; 23 17 void main( T & ) { 24 while( go == 0 ) { yield(); }25 18 BENCH( 26 while ( go == 1 ) { call( m1, m2 ); }, 19 for ( times ) { 20 call( m1, m2 ); 21 }, 27 22 result 28 23 ) -
TabularUnified benchmark/schedext/cfa4.cfa ¶
rc12869e r26fd986 4 4 #include <stdio.h> 5 5 6 #include "bench.h" 7 8 volatile int go = 0; 6 #include "../bench.h" 9 7 10 8 monitor M {} m1, m2, m3, m4; 11 9 12 10 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {} 13 14 11 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) { 15 go = 1;16 12 for ( times ) { 17 13 waitfor( call : p1, p2, p3, p4 ); 18 14 } 19 go = 0;20 15 } 21 22 16 thread T {}; 23 17 void main( T & ) { 24 while( go == 0 ) { yield(); }25 18 BENCH( 26 while( go == 1 ) { call( m1, m2, m3, m4 ); }, 19 for ( times ) { 20 call( m1, m2, m3, m4 ); 21 }, 27 22 result 28 23 ) -
TabularUnified benchmark/schedext/upp.cc ¶
rc12869e r26fd986 3 3 #include "bench.h" 4 4 5 volatile int go = 0;6 7 5 _Monitor M { 8 6 public: 9 7 void __attribute__((noinline)) call() {} 10 11 int __attribute__((noinline)) wait() { 12 go = 1; 8 void __attribute__((noinline)) wait() { 13 9 for ( size_t i = 0; i < times; i++ ) { 14 10 _Accept(call); 15 11 } 16 go = 0;17 return 0;18 12 } 19 13 } m; … … 21 15 _Task T { 22 16 void main() { 23 while ( go == 0 ) { yield(); }24 17 BENCH( 25 while ( go == 1 ) { m.call(); }, 18 for ( size_t i = 0; i < times; i++ ) { 19 m.call(); 20 }, 26 21 result 27 22 ) … … 33 28 BENCH_START() 34 29 T t; 35 returnm.wait();30 m.wait(); 36 31 } 37 32
Note: See TracChangeset
for help on using the changeset viewer.