ChibiOS/RT Architecture - Reference Manual - Guides |
00001 /* 00002 ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. 00003 00004 This file is part of ChibiOS/RT. 00005 00006 ChibiOS/RT is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 ChibiOS/RT is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 00019 --- 00020 00021 A special exception to the GPL can be applied should you wish to distribute 00022 a combined work that includes ChibiOS/RT, without being obliged to provide 00023 the source code for any proprietary components. See the file exception.txt 00024 for full details of how and when the exception can be applied. 00025 */ 00026 00027 #include "ch.h" 00028 #include "test.h" 00029 00030 /** 00031 * @page test_benchmarks Kernel Benchmarks 00032 * 00033 * File: @ref testbmk.c 00034 * 00035 * <h2>Description</h2> 00036 * This module implements a series of system benchmarks. The benchmarks are 00037 * useful as a stress test and as a reference when comparing ChibiOS/RT 00038 * with similar systems. 00039 * 00040 * <h2>Objective</h2> 00041 * Objective of the test module is to provide a performance index for the 00042 * most critical system subsystems. The performance numbers allow to 00043 * discover performance regressions between successive ChibiOS/RT releases. 00044 * 00045 * <h2>Preconditions</h2> 00046 * None. 00047 * 00048 * <h2>Test Cases</h2> 00049 * - @subpage test_benchmarks_001 00050 * - @subpage test_benchmarks_002 00051 * - @subpage test_benchmarks_003 00052 * - @subpage test_benchmarks_004 00053 * - @subpage test_benchmarks_005 00054 * - @subpage test_benchmarks_006 00055 * - @subpage test_benchmarks_007 00056 * - @subpage test_benchmarks_008 00057 * - @subpage test_benchmarks_009 00058 * - @subpage test_benchmarks_010 00059 * - @subpage test_benchmarks_011 00060 * - @subpage test_benchmarks_012 00061 * - @subpage test_benchmarks_013 00062 * . 00063 * @file testbmk.c Kernel Benchmarks 00064 * @brief Kernel Benchmarks source file 00065 * @file testbmk.h 00066 * @brief Kernel Benchmarks header file 00067 */ 00068 00069 static Semaphore sem1; 00070 #if CH_USE_MUTEXES 00071 static Mutex mtx1; 00072 #endif 00073 00074 static msg_t thread1(void *p) { 00075 msg_t msg; 00076 00077 (void)p; 00078 do { 00079 chMsgRelease(msg = chMsgWait()); 00080 } while (msg); 00081 return 0; 00082 } 00083 00084 #ifdef __GNUC__ 00085 __attribute__((noinline)) 00086 #endif 00087 static unsigned int msg_loop_test(Thread *tp) { 00088 00089 uint32_t n = 0; 00090 test_wait_tick(); 00091 test_start_timer(1000); 00092 do { 00093 (void)chMsgSend(tp, 1); 00094 n++; 00095 #if defined(SIMULATOR) 00096 ChkIntSources(); 00097 #endif 00098 } while (!test_timer_done); 00099 (void)chMsgSend(tp, 0); 00100 return n; 00101 } 00102 00103 /** 00104 * @page test_benchmarks_001 Messages performance #1 00105 * 00106 * <h2>Description</h2> 00107 * A message server thread is created with a lower priority than the client 00108 * thread, the messages throughput per second is measured and the result 00109 * printed in the output log. 00110 */ 00111 00112 static char *bmk1_gettest(void) { 00113 00114 return "Benchmark, messages #1"; 00115 } 00116 00117 static void bmk1_execute(void) { 00118 uint32_t n; 00119 00120 threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()-1, thread1, NULL); 00121 n = msg_loop_test(threads[0]); 00122 test_wait_threads(); 00123 test_print("--- Score : "); 00124 test_printn(n); 00125 test_print(" msgs/S, "); 00126 test_printn(n << 1); 00127 test_println(" ctxswc/S"); 00128 } 00129 00130 const struct testcase testbmk1 = { 00131 bmk1_gettest, 00132 NULL, 00133 NULL, 00134 bmk1_execute 00135 }; 00136 00137 /** 00138 * @page test_benchmarks_002 Messages performance #2 00139 * 00140 * <h2>Description</h2> 00141 * A message server thread is created with an higher priority than the client 00142 * thread, the messages throughput per second is measured and the result 00143 * printed in the output log. 00144 */ 00145 00146 static char *bmk2_gettest(void) { 00147 00148 return "Benchmark, messages #2"; 00149 } 00150 00151 static void bmk2_execute(void) { 00152 uint32_t n; 00153 00154 threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread1, NULL); 00155 n = msg_loop_test(threads[0]); 00156 test_wait_threads(); 00157 test_print("--- Score : "); 00158 test_printn(n); 00159 test_print(" msgs/S, "); 00160 test_printn(n << 1); 00161 test_println(" ctxswc/S"); 00162 } 00163 00164 const struct testcase testbmk2 = { 00165 bmk2_gettest, 00166 NULL, 00167 NULL, 00168 bmk2_execute 00169 }; 00170 00171 static msg_t thread2(void *p) { 00172 00173 return (msg_t)p; 00174 } 00175 00176 /** 00177 * @page test_benchmarks_003 Messages performance #3 00178 * 00179 * <h2>Description</h2> 00180 * A message server thread is created with an higher priority than the client 00181 * thread, four lower priority threads crowd the ready list, the messages 00182 * throughput per second is measured while the ready list and the result 00183 * printed in the output log. 00184 */ 00185 00186 static char *bmk3_gettest(void) { 00187 00188 return "Benchmark, messages #3"; 00189 } 00190 00191 static void bmk3_execute(void) { 00192 uint32_t n; 00193 00194 threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread1, NULL); 00195 threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()-2, thread2, NULL); 00196 threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()-3, thread2, NULL); 00197 threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()-4, thread2, NULL); 00198 threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()-5, thread2, NULL); 00199 n = msg_loop_test(threads[0]); 00200 test_wait_threads(); 00201 test_print("--- Score : "); 00202 test_printn(n); 00203 test_print(" msgs/S, "); 00204 test_printn(n << 1); 00205 test_println(" ctxswc/S"); 00206 } 00207 00208 const struct testcase testbmk3 = { 00209 bmk3_gettest, 00210 NULL, 00211 NULL, 00212 bmk3_execute 00213 }; 00214 00215 /** 00216 * @page test_benchmarks_004 Context Switch performance 00217 * 00218 * <h2>Description</h2> 00219 * A thread is created that just performs a @p chSchGoSleepS() into a loop, 00220 * the thread is awakened as fast is possible by the tester thread.<br> 00221 * The Context Switch performance is calculated by measuring the number of 00222 * iterations after a second of continuous operations. 00223 */ 00224 00225 static char *bmk4_gettest(void) { 00226 00227 return "Benchmark, context switch"; 00228 } 00229 00230 msg_t thread4(void *p) { 00231 msg_t msg; 00232 Thread *self = chThdSelf(); 00233 00234 (void)p; 00235 chSysLock(); 00236 do { 00237 chSchGoSleepS(THD_STATE_SUSPENDED); 00238 msg = self->p_u.rdymsg; 00239 } while (msg == RDY_OK); 00240 chSysUnlock(); 00241 return 0; 00242 } 00243 00244 static void bmk4_execute(void) { 00245 Thread *tp; 00246 uint32_t n; 00247 00248 tp = threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread4, NULL); 00249 n = 0; 00250 test_wait_tick(); 00251 test_start_timer(1000); 00252 do { 00253 chSysLock(); 00254 chSchWakeupS(tp, RDY_OK); 00255 chSchWakeupS(tp, RDY_OK); 00256 chSchWakeupS(tp, RDY_OK); 00257 chSchWakeupS(tp, RDY_OK); 00258 chSysUnlock(); 00259 n += 4; 00260 #if defined(SIMULATOR) 00261 ChkIntSources(); 00262 #endif 00263 } while (!test_timer_done); 00264 chSysLock(); 00265 chSchWakeupS(tp, RDY_TIMEOUT); 00266 chSysUnlock(); 00267 00268 test_wait_threads(); 00269 test_print("--- Score : "); 00270 test_printn(n * 2); 00271 test_println(" ctxswc/S"); 00272 } 00273 00274 const struct testcase testbmk4 = { 00275 bmk4_gettest, 00276 NULL, 00277 NULL, 00278 bmk4_execute 00279 }; 00280 00281 /** 00282 * @page test_benchmarks_005 Threads performance, full cycle 00283 * 00284 * <h2>Description</h2> 00285 * Threads are continuously created and terminated into a loop. A full 00286 * @p chThdCreateStatic() / @p chThdExit() / @p chThdWait() cycle is performed 00287 * in each iteration.<br> 00288 * The performance is calculated by measuring the number of iterations after 00289 * a second of continuous operations. 00290 */ 00291 00292 static char *bmk5_gettest(void) { 00293 00294 return "Benchmark, threads, full cycle"; 00295 } 00296 00297 static void bmk5_execute(void) { 00298 00299 uint32_t n = 0; 00300 void *wap = wa[0]; 00301 tprio_t prio = chThdGetPriority() - 1; 00302 test_wait_tick(); 00303 test_start_timer(1000); 00304 do { 00305 chThdWait(chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL)); 00306 n++; 00307 #if defined(SIMULATOR) 00308 ChkIntSources(); 00309 #endif 00310 } while (!test_timer_done); 00311 test_print("--- Score : "); 00312 test_printn(n); 00313 test_println(" threads/S"); 00314 } 00315 00316 const struct testcase testbmk5 = { 00317 bmk5_gettest, 00318 NULL, 00319 NULL, 00320 bmk5_execute 00321 }; 00322 00323 /** 00324 * @page test_benchmarks_006 Threads performance, create/exit only 00325 * 00326 * <h2>Description</h2> 00327 * Threads are continuously created and terminated into a loop. A partial 00328 * @p chThdCreateStatic() / @p chThdExit() cycle is performed in each 00329 * iteration, the @p chThdWait() is not necessary because the thread is 00330 * created at an higher priority so there is no need to wait for it to 00331 * terminate.<br> 00332 * The performance is calculated by measuring the number of iterations after 00333 * a second of continuous operations. 00334 */ 00335 00336 static char *bmk6_gettest(void) { 00337 00338 return "Benchmark, threads, create only"; 00339 } 00340 00341 static void bmk6_execute(void) { 00342 00343 uint32_t n = 0; 00344 void *wap = wa[0]; 00345 tprio_t prio = chThdGetPriority() + 1; 00346 test_wait_tick(); 00347 test_start_timer(1000); 00348 do { 00349 chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL); 00350 n++; 00351 #if defined(SIMULATOR) 00352 ChkIntSources(); 00353 #endif 00354 } while (!test_timer_done); 00355 test_print("--- Score : "); 00356 test_printn(n); 00357 test_println(" threads/S"); 00358 } 00359 00360 const struct testcase testbmk6 = { 00361 bmk6_gettest, 00362 NULL, 00363 NULL, 00364 bmk6_execute 00365 }; 00366 00367 /** 00368 * @page test_benchmarks_007 Mass reschedule performance 00369 * 00370 * <h2>Description</h2> 00371 * Five threads are created and atomically rescheduled by resetting the 00372 * semaphore where they are waiting on. The operation is performed into a 00373 * continuous loop.<br> 00374 * The performance is calculated by measuring the number of iterations after 00375 * a second of continuous operations. 00376 */ 00377 00378 static msg_t thread3(void *p) { 00379 00380 (void)p; 00381 while (!chThdShouldTerminate()) 00382 chSemWait(&sem1); 00383 return 0; 00384 } 00385 00386 static char *bmk7_gettest(void) { 00387 00388 return "Benchmark, mass reschedule, 5 threads"; 00389 } 00390 00391 static void bmk7_setup(void) { 00392 00393 chSemInit(&sem1, 0); 00394 } 00395 00396 static void bmk7_execute(void) { 00397 uint32_t n; 00398 00399 threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+5, thread3, NULL); 00400 threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()+4, thread3, NULL); 00401 threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()+3, thread3, NULL); 00402 threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()+2, thread3, NULL); 00403 threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()+1, thread3, NULL); 00404 00405 n = 0; 00406 test_wait_tick(); 00407 test_start_timer(1000); 00408 do { 00409 chSemReset(&sem1, 0); 00410 n++; 00411 #if defined(SIMULATOR) 00412 ChkIntSources(); 00413 #endif 00414 } while (!test_timer_done); 00415 test_terminate_threads(); 00416 chSemReset(&sem1, 0); 00417 test_wait_threads(); 00418 00419 test_print("--- Score : "); 00420 test_printn(n); 00421 test_print(" reschedules/S, "); 00422 test_printn(n * 6); 00423 test_println(" ctxswc/S"); 00424 } 00425 00426 const struct testcase testbmk7 = { 00427 bmk7_gettest, 00428 bmk7_setup, 00429 NULL, 00430 bmk7_execute 00431 }; 00432 00433 /** 00434 * @page test_benchmarks_008 I/O Round-Robin voluntary reschedule. 00435 * 00436 * <h2>Description</h2> 00437 * Five threads are created at equal priority, each thread just increases a 00438 * variable and yields.<br> 00439 * The performance is calculated by measuring the number of iterations after 00440 * a second of continuous operations. 00441 */ 00442 00443 static msg_t thread8(void *p) { 00444 00445 do { 00446 chThdYield(); 00447 chThdYield(); 00448 chThdYield(); 00449 chThdYield(); 00450 (*(uint32_t *)p) += 4; 00451 #if defined(SIMULATOR) 00452 ChkIntSources(); 00453 #endif 00454 } while(!chThdShouldTerminate()); 00455 return 0; 00456 } 00457 00458 static char *bmk8_gettest(void) { 00459 00460 return "Benchmark, round robin context switching"; 00461 } 00462 00463 static void bmk8_execute(void) { 00464 uint32_t n; 00465 00466 n = 0; 00467 test_wait_tick(); 00468 00469 threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()-1, thread8, (void *)&n); 00470 threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()-1, thread8, (void *)&n); 00471 threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()-1, thread8, (void *)&n); 00472 threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()-1, thread8, (void *)&n); 00473 threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()-1, thread8, (void *)&n); 00474 00475 chThdSleepSeconds(1); 00476 test_terminate_threads(); 00477 test_wait_threads(); 00478 00479 test_print("--- Score : "); 00480 test_printn(n); 00481 test_println(" ctxswc/S"); 00482 } 00483 00484 const struct testcase testbmk8 = { 00485 bmk8_gettest, 00486 NULL, 00487 NULL, 00488 bmk8_execute 00489 }; 00490 00491 /** 00492 * @page test_benchmarks_009 I/O Queues throughput 00493 * 00494 * <h2>Description</h2> 00495 * Four bytes are written and then read from an @p InputQueue into a continuous 00496 * loop.<br> 00497 * The performance is calculated by measuring the number of iterations after 00498 * a second of continuous operations. 00499 */ 00500 00501 static char *bmk9_gettest(void) { 00502 00503 return "Benchmark, I/O Queues throughput"; 00504 } 00505 00506 static void bmk9_execute(void) { 00507 uint32_t n; 00508 static uint8_t ib[16]; 00509 static InputQueue iq; 00510 00511 chIQInit(&iq, ib, sizeof(ib), NULL); 00512 n = 0; 00513 test_wait_tick(); 00514 test_start_timer(1000); 00515 do { 00516 chIQPutI(&iq, 0); 00517 chIQPutI(&iq, 1); 00518 chIQPutI(&iq, 2); 00519 chIQPutI(&iq, 3); 00520 (void)chIQGet(&iq); 00521 (void)chIQGet(&iq); 00522 (void)chIQGet(&iq); 00523 (void)chIQGet(&iq); 00524 n++; 00525 #if defined(SIMULATOR) 00526 ChkIntSources(); 00527 #endif 00528 } while (!test_timer_done); 00529 test_print("--- Score : "); 00530 test_printn(n * 4); 00531 test_println(" bytes/S"); 00532 } 00533 00534 const struct testcase testbmk9 = { 00535 bmk9_gettest, 00536 NULL, 00537 NULL, 00538 bmk9_execute 00539 }; 00540 00541 /** 00542 * @page test_benchmarks_010 Virtual Timers set/reset performance 00543 * 00544 * <h2>Description</h2> 00545 * A virtual timer is set and immediately reset into a continuous loop.<br> 00546 * The performance is calculated by measuring the number of iterations after 00547 * a second of continuous operations. 00548 */ 00549 00550 static char *bmk10_gettest(void) { 00551 00552 return "Benchmark, virtual timers set/reset"; 00553 } 00554 00555 static void tmo(void *param) {(void)param;} 00556 00557 static void bmk10_execute(void) { 00558 static VirtualTimer vt1, vt2; 00559 uint32_t n = 0; 00560 00561 test_wait_tick(); 00562 test_start_timer(1000); 00563 do { 00564 chSysLock(); 00565 chVTSetI(&vt1, 1, tmo, NULL); 00566 chVTSetI(&vt2, 10000, tmo, NULL); 00567 chVTResetI(&vt1); 00568 chVTResetI(&vt2); 00569 chSysUnlock(); 00570 n++; 00571 #if defined(SIMULATOR) 00572 ChkIntSources(); 00573 #endif 00574 } while (!test_timer_done); 00575 test_print("--- Score : "); 00576 test_printn(n * 2); 00577 test_println(" timers/S"); 00578 } 00579 00580 const struct testcase testbmk10 = { 00581 bmk10_gettest, 00582 NULL, 00583 NULL, 00584 bmk10_execute 00585 }; 00586 00587 /** 00588 * @page test_benchmarks_011 Semaphores wait/signal performance 00589 * 00590 * <h2>Description</h2> 00591 * A counting semaphore is taken/released into a continuous loop, no Context 00592 * Switch happens because the counter is always non negative.<br> 00593 * The performance is calculated by measuring the number of iterations after 00594 * a second of continuous operations. 00595 */ 00596 00597 static char *bmk11_gettest(void) { 00598 00599 return "Benchmark, semaphores wait/signal"; 00600 } 00601 00602 static void bmk11_setup(void) { 00603 00604 chSemInit(&sem1, 1); 00605 } 00606 00607 static void bmk11_execute(void) { 00608 uint32_t n = 0; 00609 00610 test_wait_tick(); 00611 test_start_timer(1000); 00612 do { 00613 chSemWait(&sem1); 00614 chSemSignal(&sem1); 00615 chSemWait(&sem1); 00616 chSemSignal(&sem1); 00617 chSemWait(&sem1); 00618 chSemSignal(&sem1); 00619 chSemWait(&sem1); 00620 chSemSignal(&sem1); 00621 n++; 00622 #if defined(SIMULATOR) 00623 ChkIntSources(); 00624 #endif 00625 } while (!test_timer_done); 00626 test_print("--- Score : "); 00627 test_printn(n * 4); 00628 test_println(" wait+signal/S"); 00629 } 00630 00631 const struct testcase testbmk11 = { 00632 bmk11_gettest, 00633 bmk11_setup, 00634 NULL, 00635 bmk11_execute 00636 }; 00637 00638 #if CH_USE_MUTEXES 00639 /** 00640 * @page test_benchmarks_012 Mutexes lock/unlock performance 00641 * 00642 * <h2>Description</h2> 00643 * A mutex is locked/unlocked into a continuous loop, no Context Switch happens 00644 * because there are no other threads asking for the mutex.<br> 00645 * The performance is calculated by measuring the number of iterations after 00646 * a second of continuous operations. 00647 */ 00648 00649 static char *bmk12_gettest(void) { 00650 00651 return "Benchmark, mutexes lock/unlock"; 00652 } 00653 00654 static void bmk12_setup(void) { 00655 00656 chMtxInit(&mtx1); 00657 } 00658 00659 static void bmk12_execute(void) { 00660 uint32_t n = 0; 00661 00662 test_wait_tick(); 00663 test_start_timer(1000); 00664 do { 00665 chMtxLock(&mtx1); 00666 chMtxUnlock(); 00667 chMtxLock(&mtx1); 00668 chMtxUnlock(); 00669 chMtxLock(&mtx1); 00670 chMtxUnlock(); 00671 chMtxLock(&mtx1); 00672 chMtxUnlock(); 00673 n++; 00674 #if defined(SIMULATOR) 00675 ChkIntSources(); 00676 #endif 00677 } while (!test_timer_done); 00678 test_print("--- Score : "); 00679 test_printn(n * 4); 00680 test_println(" lock+unlock/S"); 00681 } 00682 00683 const struct testcase testbmk12 = { 00684 bmk12_gettest, 00685 bmk12_setup, 00686 NULL, 00687 bmk12_execute 00688 }; 00689 #endif 00690 00691 /** 00692 * @page test_benchmarks_013 RAM Footprint 00693 * 00694 * <h2>Description</h2> 00695 * The memory size of the various kernel objects is printed. 00696 */ 00697 00698 static char *bmk13_gettest(void) { 00699 00700 return "Benchmark, RAM footprint"; 00701 } 00702 00703 static void bmk13_execute(void) { 00704 00705 test_print("--- System: "); 00706 test_printn(sizeof(ReadyList) + sizeof(VTList) + IDLE_THREAD_STACK_SIZE + 00707 (sizeof(Thread) + sizeof(struct intctx) + sizeof(struct extctx) + 00708 INT_REQUIRED_STACK) * 2); 00709 test_println(" bytes"); 00710 test_print("--- Thread: "); 00711 test_printn(sizeof(Thread)); 00712 test_println(" bytes"); 00713 test_print("--- Timer : "); 00714 test_printn(sizeof(VirtualTimer)); 00715 test_println(" bytes"); 00716 test_print("--- Semaph: "); 00717 test_printn(sizeof(Semaphore)); 00718 test_println(" bytes"); 00719 #if CH_USE_EVENTS 00720 test_print("--- EventS: "); 00721 test_printn(sizeof(EventSource)); 00722 test_println(" bytes"); 00723 test_print("--- EventL: "); 00724 test_printn(sizeof(EventListener)); 00725 test_println(" bytes"); 00726 #endif 00727 #if CH_USE_MUTEXES 00728 test_print("--- Mutex : "); 00729 test_printn(sizeof(Mutex)); 00730 test_println(" bytes"); 00731 #endif 00732 #if CH_USE_CONDVARS 00733 test_print("--- CondV.: "); 00734 test_printn(sizeof(CondVar)); 00735 test_println(" bytes"); 00736 #endif 00737 #if CH_USE_QUEUES 00738 test_print("--- Queue : "); 00739 test_printn(sizeof(GenericQueue)); 00740 test_println(" bytes"); 00741 #endif 00742 #if CH_USE_MAILBOXES 00743 test_print("--- MailB.: "); 00744 test_printn(sizeof(Mailbox)); 00745 test_println(" bytes"); 00746 #endif 00747 } 00748 00749 const struct testcase testbmk13 = { 00750 bmk13_gettest, 00751 NULL, 00752 NULL, 00753 bmk13_execute 00754 }; 00755 00756 /** 00757 * @brief Test sequence for benchmarks. 00758 */ 00759 const struct testcase * const patternbmk[] = { 00760 #if !TEST_NO_BENCHMARKS 00761 &testbmk1, 00762 &testbmk2, 00763 &testbmk3, 00764 &testbmk4, 00765 &testbmk5, 00766 &testbmk6, 00767 &testbmk7, 00768 &testbmk8, 00769 &testbmk9, 00770 &testbmk10, 00771 &testbmk11, 00772 #if CH_USE_MUTEXES 00773 &testbmk12, 00774 #endif 00775 &testbmk13, 00776 #endif 00777 NULL 00778 };