From 1914bcbbf422a9616dd2c1d6906a8ced3548921d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 16 Mar 2016 11:09:29 +0000 Subject: Removed I/O queues and streams from RT. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9125 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/rt/testbmk.c | 101 +++++++++++++----------------------------------------- 1 file changed, 24 insertions(+), 77 deletions(-) (limited to 'test/rt/testbmk.c') diff --git a/test/rt/testbmk.c b/test/rt/testbmk.c index 3cc713089..b5d4e4a6d 100644 --- a/test/rt/testbmk.c +++ b/test/rt/testbmk.c @@ -48,7 +48,6 @@ * - @subpage test_benchmarks_010 * - @subpage test_benchmarks_011 * - @subpage test_benchmarks_012 - * - @subpage test_benchmarks_013 * . * @file testbmk.c Kernel Benchmarks * @brief Kernel Benchmarks source file @@ -448,57 +447,8 @@ ROMCONST struct testcase testbmk8 = { bmk8_execute }; -#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__) /** - * @page test_benchmarks_009 I/O Queues throughput - * - *

Description

- * Four bytes are written and then read from an @p InputQueue into a continuous - * loop.
- * The performance is calculated by measuring the number of iterations after - * a second of continuous operations. - */ - -static void bmk9_execute(void) { - uint32_t n; - static uint8_t ib[16]; - static input_queue_t iq; - - chIQObjectInit(&iq, ib, sizeof(ib), NULL, NULL); - n = 0; - test_wait_tick(); - test_start_timer(1000); - do { - chSysLock(); - chIQPutI(&iq, 0); - chIQPutI(&iq, 1); - chIQPutI(&iq, 2); - chIQPutI(&iq, 3); - chSysUnlock(); - (void)chIQGet(&iq); - (void)chIQGet(&iq); - (void)chIQGet(&iq); - (void)chIQGet(&iq); - n++; -#if defined(SIMULATOR) - _sim_check_for_interrupts(); -#endif - } while (!test_timer_done); - test_print("--- Score : "); - test_printn(n * 4); - test_println(" bytes/S"); -} - -ROMCONST struct testcase testbmk9 = { - "Benchmark, I/O Queues throughput", - NULL, - NULL, - bmk9_execute -}; -#endif /* CH_CFG_USE_QUEUES */ - -/** - * @page test_benchmarks_010 Virtual Timers set/reset performance + * @page test_benchmarks_009 Virtual Timers set/reset performance * *

Description

* A virtual timer is set and immediately reset into a continuous loop.
@@ -508,7 +458,7 @@ ROMCONST struct testcase testbmk9 = { static void tmo(void *param) {(void)param;} -static void bmk10_execute(void) { +static void bmk09_execute(void) { static virtual_timer_t vt1, vt2; uint32_t n = 0; @@ -531,16 +481,16 @@ static void bmk10_execute(void) { test_println(" timers/S"); } -ROMCONST struct testcase testbmk10 = { +ROMCONST struct testcase testbmk9 = { "Benchmark, virtual timers set/reset", NULL, NULL, - bmk10_execute + bmk09_execute }; #if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__) /** - * @page test_benchmarks_011 Semaphores wait/signal performance + * @page test_benchmarks_010 Semaphores wait/signal performance * *

Description

* A counting semaphore is taken/released into a continuous loop, no Context @@ -549,12 +499,12 @@ ROMCONST struct testcase testbmk10 = { * a second of continuous operations. */ -static void bmk11_setup(void) { +static void bmk10_setup(void) { chSemObjectInit(&sem1, 1); } -static void bmk11_execute(void) { +static void bmk10_execute(void) { uint32_t n = 0; test_wait_tick(); @@ -578,17 +528,17 @@ static void bmk11_execute(void) { test_println(" wait+signal/S"); } -ROMCONST struct testcase testbmk11 = { +ROMCONST struct testcase testbmk10 = { "Benchmark, semaphores wait/signal", - bmk11_setup, + bmk10_setup, NULL, - bmk11_execute + bmk10_execute }; #endif #if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) /** - * @page test_benchmarks_012 Mutexes lock/unlock performance + * @page test_benchmarks_011 Mutexes lock/unlock performance * *

Description

* A mutex is locked/unlocked into a continuous loop, no Context Switch happens @@ -597,12 +547,12 @@ ROMCONST struct testcase testbmk11 = { * a second of continuous operations. */ -static void bmk12_setup(void) { +static void bmk11_setup(void) { chMtxObjectInit(&mtx1); } -static void bmk12_execute(void) { +static void bmk11_execute(void) { uint32_t n = 0; test_wait_tick(); @@ -626,22 +576,22 @@ static void bmk12_execute(void) { test_println(" lock+unlock/S"); } -ROMCONST struct testcase testbmk12 = { +ROMCONST struct testcase testbmk11 = { "Benchmark, mutexes lock/unlock", - bmk12_setup, + bmk11_setup, NULL, - bmk12_execute + bmk11_execute }; #endif /** - * @page test_benchmarks_013 RAM Footprint + * @page test_benchmarks_012 RAM Footprint * *

Description

* The memory size of the various kernel objects is printed. */ -static void bmk13_execute(void) { +static void bmk12_execute(void) { test_print("--- System: "); test_printn(sizeof(ch_system_t)); @@ -675,7 +625,7 @@ static void bmk13_execute(void) { test_printn(sizeof(condition_variable_t)); test_println(" bytes"); #endif -#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__) +#if 0 test_print("--- Queue : "); test_printn(sizeof(io_queue_t)); test_println(" bytes"); @@ -687,11 +637,11 @@ static void bmk13_execute(void) { #endif } -ROMCONST struct testcase testbmk13 = { +ROMCONST struct testcase testbmk12 = { "Benchmark, RAM footprint", NULL, NULL, - bmk13_execute + bmk12_execute }; /** @@ -711,17 +661,14 @@ ROMCONST struct testcase * ROMCONST patternbmk[] = { &testbmk7, #endif &testbmk8, -#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__) &testbmk9, -#endif - &testbmk10, #if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__) - &testbmk11, + &testbmk10, #endif #if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) - &testbmk12, + &testbmk11, #endif - &testbmk13, + &testbmk12, #endif NULL }; -- cgit v1.2.3