Changeset 2316525 for benchmark/schedext
- Timestamp:
- Jan 19, 2020, 4:16:27 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:
- f090750
- Parents:
- 9e63a2b
- Location:
- benchmark/schedext
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified benchmark/schedext/cfa1.cfa ¶
r9e63a2b r2316525 4 4 #include <stdio.h> 5 5 6 #include " bench.h"6 #include "../bench.h" 7 7 8 8 volatile int go = 0; 9 9 10 monitor M {}; 11 M m1; 10 monitor M {} m1; 12 11 13 void __attribute__((noinline)) call( M & mutex a1 ) {}12 void __attribute__((noinline)) call( M & mutex p1 ) {} 14 13 15 int __attribute__((noinline)) wait( M & mutex a1 ) {14 void __attribute__((noinline)) wait( M & mutex p1 ) { 16 15 go = 1; 17 for ( i;times ) {18 waitfor( call : a1);16 for ( times ) { 17 waitfor( call : p1 ); 19 18 } 20 19 go = 0; 21 return 0;22 20 } 23 21 24 22 thread T {}; 25 void ^?{}( T & mutex this ) {}26 23 void main( T & ) { 27 while (go == 0) { yield(); }24 while ( go == 0 ) { yield(); } 28 25 BENCH( 29 while (go == 1) { call(m1); },26 while ( go == 1 ) { call( m1 ); }, 30 27 result 31 28 ) … … 36 33 BENCH_START() 37 34 T t; 38 returnwait( m1 );35 wait( m1 ); 39 36 } 40 37 -
TabularUnified benchmark/schedext/cfa2.cfa ¶
r9e63a2b r2316525 8 8 volatile int go = 0; 9 9 10 monitor M {}; 11 M m1, m2; 10 monitor M {} m1, m2; 12 11 13 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {}12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {} 14 13 15 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) {14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) { 16 15 go = 1; 17 for ( i;times ) {18 waitfor( call : a1, a2);16 for ( times ) { 17 waitfor( call : p1, p2 ); 19 18 } 20 19 go = 0; 21 return 0;22 20 } 23 21 24 22 thread T {}; 25 void ^?{}( T & mutex this ) {}26 23 void main( T & ) { 27 while( go == 0) { yield(); }24 while( go == 0 ) { yield(); } 28 25 BENCH( 29 while (go == 1) { call(m1, m2); },26 while ( go == 1 ) { call( m1, m2 ); }, 30 27 result 31 28 ) … … 36 33 BENCH_START() 37 34 T t; 38 returnwait( m1, m2 );35 wait( m1, m2 ); 39 36 } 40 37 -
TabularUnified benchmark/schedext/cfa4.cfa ¶
r9e63a2b r2316525 8 8 volatile int go = 0; 9 9 10 monitor M {}; 11 M m1, m2, m3, m4; 10 monitor M {} m1, m2, m3, m4; 12 11 13 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {}12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {} 14 13 15 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) { 16 15 go = 1; 17 for ( i;times ) {18 waitfor( call : a1, a2, a3, a4 );16 for ( times ) { 17 waitfor( call : p1, p2, p3, p4 ); 19 18 } 20 19 go = 0; 21 return 0;22 20 } 23 21 24 22 thread T {}; 25 void ^?{}( T & mutex this ) {}26 23 void main( T & ) { 27 while( go == 0) { yield(); }24 while( go == 0 ) { yield(); } 28 25 BENCH( 29 while( go == 1) { call(m1, m2, m3, m4); },26 while( go == 1 ) { call( m1, m2, m3, m4 ); }, 30 27 result 31 28 ) … … 36 33 BENCH_START() 37 34 T t; 38 returnwait( m1, m2, m3, m4 );35 wait( m1, m2, m3, m4 ); 39 36 } 40 37 -
TabularUnified benchmark/schedext/upp.cc ¶
r9e63a2b r2316525 11 11 int __attribute__((noinline)) wait() { 12 12 go = 1; 13 for ( size_t i = 0; i < times; i++) {13 for ( size_t i = 0; i < times; i++ ) { 14 14 _Accept(call); 15 15 } … … 17 17 return 0; 18 18 } 19 }; 20 21 M m; 19 } m; 22 20 23 21 _Task T { 24 22 void main() { 25 while (go == 0) { yield(); }23 while ( go == 0 ) { yield(); } 26 24 BENCH( 27 while (go == 1) { m.call(); },25 while ( go == 1 ) { m.call(); }, 28 26 result 29 27 )
Note: See TracChangeset
for help on using the changeset viewer.