Changes in / [f090750:96f5b30]
- Location:
- benchmark
- Files:
-
- 25 edited
-
Makefile.am (modified) (4 diffs)
-
Makefile.in (modified) (3 diffs)
-
creation/cfa_cor.cfa (modified) (1 diff)
-
creation/cfa_thrd.cfa (modified) (1 diff)
-
creation/node_cor.js (modified) (1 diff)
-
ctxswitch/cfa_cor.cfa (modified) (2 diffs)
-
ctxswitch/cfa_cor_then.cfa (modified) (2 diffs)
-
ctxswitch/cfa_gen.cfa (modified) (2 diffs)
-
ctxswitch/cfa_thrd.cfa (modified) (1 diff)
-
ctxswitch/cfa_thrd2.cfa (modified) (2 diffs)
-
ctxswitch/python_cor.py (modified) (1 diff)
-
ctxswitch/upp_cor.cc (modified) (2 diffs)
-
mutex/cfa1.cfa (modified) (1 diff)
-
mutex/cfa2.cfa (modified) (1 diff)
-
mutex/cfa4.cfa (modified) (1 diff)
-
mutexC/cfa1.cfa (modified) (1 diff)
-
mutexC/cfa2.cfa (modified) (1 diff)
-
mutexC/cfa4.cfa (modified) (1 diff)
-
schedext/cfa1.cfa (modified) (2 diffs)
-
schedext/cfa2.cfa (modified) (2 diffs)
-
schedext/cfa4.cfa (modified) (2 diffs)
-
schedext/upp.cc (modified) (2 diffs)
-
schedint/cfa1.cfa (modified) (2 diffs)
-
schedint/cfa2.cfa (modified) (2 diffs)
-
schedint/cfa4.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.am
rf090750 r96f5b30 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Sun Jan 19 12:55:02 202014 ## Update Count : 23 213 ## Last Modified On : Fri Jan 10 11:29:52 2020 14 ## Update Count : 230 15 15 ############################################################################### 16 16 … … 83 83 basic_loop_DURATION = 15000000000 84 84 basic_function_DURATION = 10000000000 85 basic_tls_fetch_add_DURATION = 1000000000086 85 basic_DURATION = 250000000 87 86 … … 292 291 ctxswitch-nodejs_coroutine$(EXEEXT): 293 292 echo "#!/bin/sh" > a.out 294 echo "node js$(srcdir)/ctxswitch/node_cor.js" >> a.out293 echo "node $(srcdir)/ctxswitch/node_cor.js" >> a.out 295 294 chmod a+x a.out 296 295 … … 435 434 creation-nodejs_coroutine$(EXEEXT): 436 435 echo "#!/bin/sh" > a.out 437 echo "node js$(srcdir)/creation/node_cor.js" >> a.out436 echo "node $(srcdir)/creation/node_cor.js" >> a.out 438 437 chmod a+x a.out 439 438 -
benchmark/Makefile.in
rf090750 r96f5b30 421 421 basic_loop_DURATION = 15000000000 422 422 basic_function_DURATION = 10000000000 423 basic_tls_fetch_add_DURATION = 10000000000424 423 basic_DURATION = 250000000 425 424 ctxswitch_pthread_DURATION = 25000000 … … 934 933 ctxswitch-nodejs_coroutine$(EXEEXT): 935 934 echo "#!/bin/sh" > a.out 936 echo "node js$(srcdir)/ctxswitch/node_cor.js" >> a.out935 echo "node $(srcdir)/ctxswitch/node_cor.js" >> a.out 937 936 chmod a+x a.out 938 937 … … 1069 1068 creation-nodejs_coroutine$(EXEEXT): 1070 1069 echo "#!/bin/sh" > a.out 1071 echo "node js$(srcdir)/creation/node_cor.js" >> a.out1070 echo "node $(srcdir)/creation/node_cor.js" >> a.out 1072 1071 chmod a+x a.out 1073 1072 -
benchmark/creation/cfa_cor.cfa
rf090750 r96f5b30 5 5 6 6 coroutine MyCoroutine {}; 7 void ?{} ( MyCoroutine & this) {7 void ?{} (MyCoroutine & this) { 8 8 #ifdef EAGER 9 resume( this);9 resume(this); 10 10 #endif 11 11 } 12 void main( MyCoroutine &) {}12 void main(MyCoroutine &) {} 13 13 14 14 int main( int argc, char * argv[] ) { 15 15 BENCH_START() 16 16 BENCH( 17 for ( times ) {18 MyCoroutine c;17 for ( i; times ) { 18 MyCoroutine m; 19 19 }, 20 20 result -
benchmark/creation/cfa_thrd.cfa
rf090750 r96f5b30 10 10 BENCH_START() 11 11 BENCH( 12 for ( times ) {12 for ( i; times ) { 13 13 MyThread m; 14 14 }, -
benchmark/creation/node_cor.js
rf090750 r96f5b30 4 4 if ( argc == 3 ) times = Number( process.argv[2] ) 5 5 6 function * coroutine() {} 6 function * coroutine() { 7 } 7 8 var hrstart = process.hrtime() 8 9 for ( var i = 0; i < times; i += 1 ) { -
benchmark/ctxswitch/cfa_cor.cfa
rf090750 r96f5b30 4 4 #include "bench.h" 5 5 6 coroutine C {} c;7 void main( __attribute__((unused)) C &) {8 while ( ) {6 coroutine GreatSuspender {}; 7 void main( __attribute__((unused)) GreatSuspender & this ) { 8 while ( true ) { 9 9 suspend(); 10 10 } … … 12 12 int main( int argc, char * argv[] ) { 13 13 BENCH_START() 14 GreatSuspender s; 14 15 BENCH( 15 for ( times ) {16 resume( c);16 for ( i; times ) { 17 resume( s ); 17 18 }, 18 19 result -
benchmark/ctxswitch/cfa_cor_then.cfa
rf090750 r96f5b30 6 6 void noOp(void) {} 7 7 8 coroutine C {} c;8 coroutine GreatSuspender {}; 9 9 10 void ?{}( C& this ) {10 void ?{}( GreatSuspender & this ) { 11 11 prime(this); 12 12 } 13 13 14 void main( __attribute__((unused)) C& this ) {15 while () {14 void main( __attribute__((unused)) GreatSuspender & this ) { 15 while( true ) { 16 16 suspend_then(noOp); 17 17 } … … 20 20 int main( int argc, char * argv[] ) { 21 21 BENCH_START() 22 GreatSuspender s; 22 23 BENCH( 23 for ( times ) {24 resume( c);24 for ( i; times ) { 25 resume( s ); 25 26 }, 26 27 result -
benchmark/ctxswitch/cfa_gen.cfa
rf090750 r96f5b30 3 3 typedef struct { 4 4 void * next; 5 } C;5 } GreatSuspender; 6 6 7 void comain( C * c) {8 if ( __builtin_expect( c->next != 0, 1) ) goto *(c->next);9 c->next = &&s1;7 void comain( GreatSuspender * this ) { 8 if ( __builtin_expect(this->next != 0, 1) ) goto *(this->next); 9 this->next = &&s1; 10 10 for () { 11 11 return; … … 16 16 int main( int argc, char * argv[] ) { 17 17 BENCH_START() 18 C c= { 0 };18 GreatSuspender s = { 0 }; 19 19 BENCH( 20 for ( times ) {21 comain( & c);20 for ( i; times ) { 21 comain( &s ); 22 22 }, 23 23 result -
benchmark/ctxswitch/cfa_thrd.cfa
rf090750 r96f5b30 6 6 BENCH_START() 7 7 BENCH( 8 for ( times ) {8 for ( i; times ) { 9 9 yield(); 10 10 }, -
benchmark/ctxswitch/cfa_thrd2.cfa
rf090750 r96f5b30 8 8 9 9 void main(__attribute__((unused)) Fibre & this) { 10 while ( ! done) {10 while(!done) { 11 11 yield(); 12 12 } … … 17 17 Fibre f1; 18 18 BENCH( 19 for ( times ) {19 for ( i; times ) { 20 20 yield(); 21 21 }, -
benchmark/ctxswitch/python_cor.py
rf090750 r96f5b30 9 9 times = int( sys.argv[1] ) 10 10 11 def C():11 def GreatSuspender(): 12 12 while True: 13 13 yield 14 14 15 c = C()15 s = GreatSuspender() 16 16 17 17 start = time.time_ns() 18 18 for i in range( 10000000 ): 19 next( c) # resume19 next( s ) # resume 20 20 end = time.time_ns() 21 21 print( (end - start) / times ) -
benchmark/ctxswitch/upp_cor.cc
rf090750 r96f5b30 3 3 #include "bench.h" 4 4 5 _Coroutine C{5 _Coroutine GreatSuspender { 6 6 void main() { 7 7 while( true ) { … … 13 13 resume(); 14 14 } 15 } c;15 }; 16 16 int main( int argc, char * argv[] ) { 17 17 BENCH_START() 18 GreatSuspender s; 18 19 BENCH( 19 20 for (size_t i = 0; i < times; i++) { 20 c.do_resume();21 s.do_resume(); 21 22 }, 22 23 result -
benchmark/mutex/cfa1.cfa
rf090750 r96f5b30 4 4 #include "bench.h" 5 5 6 monitor M {} m1;7 void __attribute__((noinline)) call( M & mutex p1) {}6 monitor M {}; 7 void __attribute__((noinline)) call( M & mutex m ) {} 8 8 9 9 int main( int argc, char * argv[] ) { 10 10 BENCH_START() 11 M m; 11 12 BENCH( 12 for ( times ) {13 call( m 1);13 for ( i; times ) { 14 call( m ); 14 15 }, 15 16 result -
benchmark/mutex/cfa2.cfa
rf090750 r96f5b30 4 4 #include "bench.h" 5 5 6 monitor M {} m1, m2; 7 8 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {} 6 monitor M {}; 7 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2 ) {} 9 8 10 9 int main( int argc, char * argv[] ) { 11 10 BENCH_START() 11 M m1, m2; 12 12 BENCH( 13 for ( times ) {13 for ( i; times ) { 14 14 call( m1, m2 ); 15 15 }, -
benchmark/mutex/cfa4.cfa
rf090750 r96f5b30 5 5 6 6 7 monitor M {} m1, m2, m3, m4;8 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {}7 monitor M {}; 8 void __attribute__((noinline)) call( M & mutex m1, M & mutex m2, M & mutex m3, M & mutex m4 ) {} 9 9 10 10 int main( int argc, char * argv[] ) { 11 11 BENCH_START() 12 M m1, m2, m3, m4; 12 13 BENCH( 13 for ( times ) {14 for ( i; times ) { 14 15 call( m1, m2, m3, m4 ); 15 16 }, -
benchmark/mutexC/cfa1.cfa
rf090750 r96f5b30 11 11 void call() { 12 12 go = true; 13 for ( times ) {13 for ( i; times ) { 14 14 call( m ); 15 15 } -
benchmark/mutexC/cfa2.cfa
rf090750 r96f5b30 11 11 void call() { 12 12 go = true; 13 for ( times ) {13 for ( i; times ) { 14 14 call( m1, m2 ); 15 15 } -
benchmark/mutexC/cfa4.cfa
rf090750 r96f5b30 11 11 void call() { 12 12 go = true; 13 for ( times ) {13 for ( i; times ) { 14 14 call( m1, m2, m3, m4 ); 15 15 } -
benchmark/schedext/cfa1.cfa
rf090750 r96f5b30 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 {} m1; 10 monitor M {}; 11 M m1; 11 12 12 void __attribute__((noinline)) call( M & mutex p1 ) {}13 void __attribute__((noinline)) call( M & mutex a1 ) {} 13 14 14 void __attribute__((noinline)) wait( M & mutex p1 ) {15 int __attribute__((noinline)) wait( M & mutex a1 ) { 15 16 go = 1; 16 for ( times ) {17 waitfor( call : p1);17 for ( i; times ) { 18 waitfor(call : a1); 18 19 } 19 20 go = 0; 21 return 0; 20 22 } 21 23 22 24 thread T {}; 25 void ^?{}( T & mutex this ) {} 23 26 void main( T & ) { 24 while ( go == 0) { yield(); }27 while(go == 0) { yield(); } 25 28 BENCH( 26 while ( go == 1 ) { call( m1); },29 while(go == 1) { call(m1); }, 27 30 result 28 31 ) … … 33 36 BENCH_START() 34 37 T t; 35 wait( m1 );38 return wait( m1 ); 36 39 } 37 40 -
benchmark/schedext/cfa2.cfa
rf090750 r96f5b30 8 8 volatile int go = 0; 9 9 10 monitor M {} m1, m2; 10 monitor M {}; 11 M m1, m2; 11 12 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {}13 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {} 13 14 14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) {15 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) { 15 16 go = 1; 16 for ( times ) {17 waitfor( call : p1, p2);17 for ( i; times ) { 18 waitfor(call : a1, a2); 18 19 } 19 20 go = 0; 21 return 0; 20 22 } 21 23 22 24 thread T {}; 25 void ^?{}( T & mutex this ) {} 23 26 void main( T & ) { 24 while( go == 0) { yield(); }27 while(go == 0) { yield(); } 25 28 BENCH( 26 while ( go == 1 ) { call( m1, m2); },29 while(go == 1) { call(m1, m2); }, 27 30 result 28 31 ) … … 33 36 BENCH_START() 34 37 T t; 35 wait( m1, m2 );38 return wait( m1, m2 ); 36 39 } 37 40 -
benchmark/schedext/cfa4.cfa
rf090750 r96f5b30 8 8 volatile int go = 0; 9 9 10 monitor M {} m1, m2, m3, m4; 10 monitor M {}; 11 M m1, m2, m3, m4; 11 12 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {}13 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {} 13 14 14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {15 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) { 15 16 go = 1; 16 for ( times ) {17 waitfor( call : p1, p2, p3, p4 );17 for ( i; times ) { 18 waitfor( call : a1, a2, a3, a4 ); 18 19 } 19 20 go = 0; 21 return 0; 20 22 } 21 23 22 24 thread T {}; 25 void ^?{}( T & mutex this ) {} 23 26 void main( T & ) { 24 while( go == 0) { yield(); }27 while(go == 0) { yield(); } 25 28 BENCH( 26 while( go == 1 ) { call( m1, m2, m3, m4); },29 while(go == 1) { call(m1, m2, m3, m4); }, 27 30 result 28 31 ) … … 33 36 BENCH_START() 34 37 T t; 35 wait( m1, m2, m3, m4 );38 return wait( m1, m2, m3, m4 ); 36 39 } 37 40 -
benchmark/schedext/upp.cc
rf090750 r96f5b30 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 } m; 19 }; 20 21 M m; 20 22 21 23 _Task T { 22 24 void main() { 23 while ( go == 0) { yield(); }25 while(go == 0) { yield(); } 24 26 BENCH( 25 while ( go == 1) { m.call(); },27 while(go == 1) { m.call(); }, 26 28 result 27 29 ) -
benchmark/schedint/cfa1.cfa
rf090750 r96f5b30 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 condition c; 10 monitor M {} m1; 11 monitor M {}; 12 M m1; 11 13 12 void __attribute__((noinline)) call( M & mutex p1 ) {13 signal( c);14 void __attribute__((noinline)) call( M & mutex a1 ) { 15 signal(c); 14 16 } 15 17 16 void __attribute__((noinline)) wait( M & mutex p1 ) {18 int __attribute__((noinline)) wait( M & mutex a1 ) { 17 19 go = 1; 18 for ( times ) { 19 wait( c ); 20 } 20 BENCH( 21 for ( i; times ) { 22 wait(c); 23 }, 24 result 25 ) 26 printf( "%g\n", result ); 21 27 go = 0; 28 return 0; 22 29 } 23 30 24 31 thread T {}; 32 void ^?{}( T & mutex ) {} 25 33 void main( T & ) { 26 while ( go == 0 ) { yield(); } 27 BENCH( 28 while ( go == 1 ) { call( m1 ); }, 29 result 30 ) 31 printf( "%g\n", result ); 34 while(go == 0) { yield(); } 35 while(go == 1) { call(m1); } 36 32 37 } 33 38 … … 35 40 BENCH_START() 36 41 T t; 37 wait( m1);42 return wait(m1); 38 43 } 39 44 -
benchmark/schedint/cfa2.cfa
rf090750 r96f5b30 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 condition c; 10 monitor M {} m1, m2; 11 monitor M {}; 12 M m1, m2; 11 13 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {13 signal( c);14 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) { 15 signal(c); 14 16 } 15 17 16 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) {18 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) { 17 19 go = 1; 18 for ( times ) { 19 wait( c ); 20 } 20 BENCH( 21 for ( i; times ) { 22 wait(c); 23 }, 24 result 25 ) 26 printf( "%g\n", result ); 21 27 go = 0; 28 return 0; 22 29 } 23 30 24 31 thread T {}; 32 void ^?{}( T & mutex this ) {} 25 33 void main( T & ) { 26 while ( go == 0 ) { yield(); } 27 BENCH( 28 while ( go == 1 ) { call( m1, m2 ); }, 29 result 30 ) 31 printf( "%g\n", result ); 34 while(go == 0) { yield(); } 35 while(go == 1) { call(m1, m2); } 36 32 37 } 33 38 … … 35 40 BENCH_START() 36 41 T t; 37 wait( m1, m2);42 return wait(m1, m2); 38 43 } 39 44 -
benchmark/schedint/cfa4.cfa
rf090750 r96f5b30 7 7 8 8 volatile int go = 0; 9 9 10 condition c; 10 monitor M {} m1, m2, m3, m4; 11 monitor M {}; 12 M m1, m2, m3, m4; 11 13 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {13 signal( c);14 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) { 15 signal(c); 14 16 } 15 17 16 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {18 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) { 17 19 go = 1; 18 for ( times ) { 19 wait( c ); 20 } 20 BENCH( 21 for ( i; times ) { 22 wait(c); 23 }, 24 result 25 ) 26 printf( "%g\n", result ); 21 27 go = 0; 28 return 0; 22 29 } 23 30 24 31 thread T {}; 32 void ^?{}( T & mutex this ) {} 25 33 void main( T & ) { 26 while ( go == 0 ) { yield(); } 27 BENCH( 28 while ( go == 1 ) { call( m1, m2, m3, m4 ); }, 29 result 30 ) 31 printf( "%g\n", result ); 34 while(go == 0) { yield(); } 35 while(go == 1) { call(m1, m2, m3, m4); } 36 32 37 } 33 38 … … 35 40 BENCH_START() 36 41 T t; 37 wait( m1, m2, m3, m4);42 return wait(m1, m2, m3, m4); 38 43 } 39 44
Note:
See TracChangeset
for help on using the changeset viewer.