Changeset 9d6f011 for src/tests/preempt_longrun
- Timestamp:
- Mar 8, 2018, 3:38:44 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 037c072
- Parents:
- 28bc8c8 (diff), 70969f8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/tests/preempt_longrun
- Files:
-
- 7 edited
-
Makefile.am (modified) (1 diff)
-
Makefile.in (modified) (1 diff)
-
create.c (modified) (1 diff)
-
enter.c (modified) (1 diff)
-
enter3.c (modified) (1 diff)
-
processor.c (modified) (1 diff)
-
yield.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/preempt_longrun/Makefile.am
r28bc8c8 r9d6f011 23 23 TIME = /usr/bin/time -f "%E" 24 24 25 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} 25 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -DLONG_TEST 26 26 CFLAGS = ${BUILD_FLAGS} 27 27 CC = @CFA_BINDIR@/@CFA_NAME@ -
src/tests/preempt_longrun/Makefile.in
r28bc8c8 r9d6f011 454 454 REPEAT = ${abs_top_srcdir}/tools/repeat 455 455 TIME = /usr/bin/time -f "%E" 456 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} 456 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -DLONG_TEST 457 457 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield 458 458 all: all-am -
src/tests/preempt_longrun/create.c
r28bc8c8 r9d6f011 2 2 #include <thread> 3 3 4 static const unsigned long N = 2_000ul;4 static const unsigned long N = 60_000ul; 5 5 6 6 #ifndef PREEMPTION_RATE -
src/tests/preempt_longrun/enter.c
r28bc8c8 r9d6f011 3 3 #include <thread> 4 4 5 static const unsigned long N = 70_000ul;5 static const unsigned long N = 2_100_000ul; 6 6 7 7 #ifndef PREEMPTION_RATE -
src/tests/preempt_longrun/enter3.c
r28bc8c8 r9d6f011 3 3 #include <thread> 4 4 5 static const unsigned long N = 50 _000ul;5 static const unsigned long N = 500_000ul; 6 6 7 7 #ifndef PREEMPTION_RATE -
src/tests/preempt_longrun/processor.c
r28bc8c8 r9d6f011 12 12 } 13 13 14 thread worker_t {};15 16 void main(worker_t & this) {}17 18 extern processor * mainProcessor;19 extern thread_desc * mainThread;20 21 14 int main(int argc, char* argv[]) { 22 for(int i = 0; i < N; i++) { 23 assert(this_processor == mainProcessor); 24 assert(this_thread == mainThread); 25 processor p; 15 processor * p[15]; 16 for ( int pi = 0; pi < 15; pi++ ) { 17 p[pi] = new(); 18 } 19 for ( int i = 0; i < N; i++) { 20 int pi = i % 15; 21 delete( p[pi] ); 22 p[pi] = new(); 26 23 } 27 24 } -
src/tests/preempt_longrun/yield.c
r28bc8c8 r9d6f011 2 2 #include <thread> 3 3 4 #ifdef LONG_TEST 5 static const unsigned long N = 9_750_000ul; 6 #else 4 7 static const unsigned long N = 325_000ul; 8 #endif 5 9 6 10 #ifndef PREEMPTION_RATE
Note:
See TracChangeset
for help on using the changeset viewer.