tests: benchmark: enable for V2 kernel

Not completely ported to V2 APIs yet, but enough that we pull in
all the kernel.h APIs for the microkernel test, bypassing the legacy
layer.

We pull in a lot more than the legacy test did, so results are not
directly comparable.

Change-Id: I35e74bfd1aa15ee59951f68fb7dd8d811619c3f8
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-11-01 13:37:45 -07:00 committed by Anas Nashif
commit 25ce056279
8 changed files with 186 additions and 12 deletions

View file

@ -7,7 +7,7 @@ CONFIG_NUM_TASK_PRIORITIES=64
CONFIG_NUM_COMMAND_PACKETS=64 CONFIG_NUM_COMMAND_PACKETS=64
CONFIG_NUM_TIMER_PACKETS=16 CONFIG_NUM_TIMER_PACKETS=16
CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096 CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=256
CONFIG_SYS_POWER_MANAGEMENT=y CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_THREAD_CUSTOM_DATA=y
CONFIG_NUM_IRQS=43 CONFIG_NUM_IRQS=43

View file

@ -8,9 +8,9 @@ CONFIG_NUM_TASK_PRIORITIES=64
CONFIG_NUM_COMMAND_PACKETS=64 CONFIG_NUM_COMMAND_PACKETS=64
CONFIG_NUM_TIMER_PACKETS=16 CONFIG_NUM_TIMER_PACKETS=16
CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096 CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=256
CONFIG_SYS_POWER_MANAGEMENT=y CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_FLOAT=y CONFIG_FLOAT=y
CONFIG_SSE=y CONFIG_SSE=y
CONFIG_FP_SHARING=y CONFIG_FP_SHARING=y
CONFIG_THREAD_CUSTOM_DATA=y

View file

@ -9,3 +9,5 @@ CONFIG_NUM_TIMER_PACKETS=16
CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096 CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096
CONFIG_SYS_POWER_MANAGEMENT=y CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_NUM_IRQS=43 CONFIG_NUM_IRQS=43
CONFIG_THREAD_CUSTOM_DATA=y
CONFIG_HEAP_MEM_POOL_SIZE=256

View file

@ -9,3 +9,5 @@ CONFIG_NUM_COMMAND_PACKETS=64
CONFIG_NUM_TIMER_PACKETS=16 CONFIG_NUM_TIMER_PACKETS=16
CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096 CONFIG_MICROKERNEL_SERVER_STACK_SIZE=4096
CONFIG_SYS_POWER_MANAGEMENT=y CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_THREAD_CUSTOM_DATA=y
CONFIG_HEAP_MEM_POOL_SIZE=256

View file

@ -44,6 +44,10 @@ typedef void* (*pfunc) (void*);
volatile int i = 0; /* counter used by foreground task */ volatile int i = 0; /* counter used by foreground task */
#ifndef CONFIG_KERNEL_V2
/* legacy microkernel */
/* pointer array ensures specified functions are linked into the image */ /* pointer array ensures specified functions are linked into the image */
static pfunc func_array[] = { static pfunc func_array[] = {
/* event functions */ /* event functions */
@ -95,6 +99,129 @@ static pfunc func_array[] = {
#endif /* TEST_max */ #endif /* TEST_max */
}; };
#else
static pfunc func_array[] = {
/* mutexes */
(pfunc)k_mutex_init,
(pfunc)k_mutex_lock,
(pfunc)k_mutex_unlock,
/* semaphores */
(pfunc)k_sem_init,
(pfunc)k_sem_take,
(pfunc)k_sem_give,
(pfunc)k_sem_reset,
(pfunc)k_sem_count_get,
/* FIFOs */
(pfunc)k_fifo_init,
(pfunc)k_fifo_put,
(pfunc)k_fifo_put_list,
(pfunc)k_fifo_put_slist,
(pfunc)k_fifo_get,
/* mem slabs */
(pfunc)k_mem_slab_init,
(pfunc)k_mem_slab_alloc,
(pfunc)k_mem_slab_free,
(pfunc)k_mem_slab_num_used_get,
(pfunc)k_mem_slab_num_free_get,
#ifdef TEST_max
/* alerts */
(pfunc)k_alert_init,
(pfunc)k_alert_send,
(pfunc)k_alert_recv,
/* message queues */
(pfunc)k_msgq_init,
(pfunc)k_msgq_put,
(pfunc)k_msgq_get,
(pfunc)k_msgq_purge,
(pfunc)k_msgq_num_free_get,
(pfunc)k_msgq_num_used_get,
/* semaphore groups */
(pfunc)k_sem_group_take,
(pfunc)k_sem_group_give,
(pfunc)k_sem_group_reset,
/* LIFOs */
(pfunc)k_lifo_init,
(pfunc)k_lifo_put,
(pfunc)k_lifo_get,
/* stacks */
(pfunc)k_stack_init,
(pfunc)k_stack_push,
(pfunc)k_stack_pop,
/* workqueues */
(pfunc)k_work_init,
(pfunc)k_work_submit_to_queue,
(pfunc)k_work_pending,
(pfunc)k_work_q_start,
(pfunc)k_delayed_work_init,
(pfunc)k_delayed_work_submit_to_queue,
(pfunc)k_delayed_work_cancel,
(pfunc)k_work_submit,
(pfunc)k_delayed_work_submit,
/* mailboxes */
(pfunc)k_mbox_init,
(pfunc)k_mbox_put,
(pfunc)k_mbox_async_put,
(pfunc)k_mbox_get,
(pfunc)k_mbox_data_get,
(pfunc)k_mbox_data_block_get,
/* pipes */
(pfunc)k_pipe_init,
(pfunc)k_pipe_put,
(pfunc)k_pipe_get,
(pfunc)k_pipe_block_put,
/* mem pools */
(pfunc)k_mem_pool_alloc,
(pfunc)k_mem_pool_free,
(pfunc)k_mem_pool_defrag,
(pfunc)k_malloc,
(pfunc)k_free,
/* timers */
(pfunc)k_timer_init,
(pfunc)k_timer_stop,
(pfunc)k_timer_status_get,
(pfunc)k_timer_status_sync,
(pfunc)k_timer_remaining_get,
(pfunc)k_uptime_get,
(pfunc)k_uptime_get_32,
(pfunc)k_uptime_delta,
(pfunc)k_uptime_delta_32,
(pfunc)k_cycle_get_32,
/* thread stuff */
(pfunc)k_thread_spawn,
(pfunc)k_sleep,
(pfunc)k_busy_wait,
(pfunc)k_yield,
(pfunc)k_wakeup,
(pfunc)k_current_get,
(pfunc)k_thread_cancel,
(pfunc)k_thread_abort,
(pfunc)k_thread_priority_get,
(pfunc)k_thread_priority_set,
(pfunc)k_thread_suspend,
(pfunc)k_thread_resume,
(pfunc)k_sched_time_slice_set,
(pfunc)k_am_in_isr,
(pfunc)k_thread_custom_data_set,
(pfunc)k_thread_custom_data_get,
#endif
};
#endif
/** /**
* *
* @brief Dummy ISR * @brief Dummy ISR

View file

@ -1,26 +1,26 @@
[footprint-min] [footprint-min]
tags = footprint tags = footprint unified_capable
extra_args = TEST=min extra_args = TEST=min
build_only = true build_only = true
filter = not CONFIG_BOARD_GALILEO filter = not CONFIG_BOARD_GALILEO
kernel = micro kernel = micro
[footprint-reg] [footprint-reg]
tags = footprint tags = footprint unified_capable
extra_args = TEST=reg extra_args = TEST=reg
build_only = true build_only = true
arch_whitelist = x86 arch_whitelist = x86
kernel = micro kernel = micro
[footprint-max] [footprint-max]
tags = footprint tags = footprint unified_capable
extra_args = TEST=max extra_args = TEST=max
build_only = true build_only = true
arch_whitelist = x86 arch_whitelist = x86
kernel = micro kernel = micro
[footprint-float] [footprint-float]
tags = footprint tags = footprint unified_capable
extra_args = TEST=float extra_args = TEST=float
build_only = true build_only = true
kernel = micro kernel = micro

View file

@ -47,6 +47,8 @@ typedef void* (*pfunc) (void*);
/* stack used by fiber */ /* stack used by fiber */
static char __stack pStack[FIBER_STACK_SIZE]; static char __stack pStack[FIBER_STACK_SIZE];
#ifndef CONFIG_KERNEL_V2
/* pointer array ensures specified functions are linked into the image */ /* pointer array ensures specified functions are linked into the image */
volatile pfunc func_array[] = { volatile pfunc func_array[] = {
/* nano timer functions */ /* nano timer functions */
@ -72,6 +74,47 @@ volatile pfunc func_array[] = {
(pfunc)nano_fiber_fifo_get, (pfunc)nano_fiber_fifo_get,
#endif /* TEST_max */ #endif /* TEST_max */
}; };
#else
static pfunc func_array[] = {
/* timers */
(pfunc)k_timer_init,
(pfunc)k_timer_stop,
(pfunc)k_timer_status_get,
(pfunc)k_timer_status_sync,
(pfunc)k_timer_remaining_get,
(pfunc)k_uptime_get,
(pfunc)k_uptime_get_32,
(pfunc)k_uptime_delta,
(pfunc)k_uptime_delta_32,
(pfunc)k_cycle_get_32,
/* semaphores */
(pfunc)k_sem_init,
(pfunc)k_sem_take,
(pfunc)k_sem_give,
(pfunc)k_sem_reset,
(pfunc)k_sem_count_get,
#ifdef TEST_max
/* LIFOs */
(pfunc)k_lifo_init,
(pfunc)k_lifo_put,
(pfunc)k_lifo_get,
/* stacks */
(pfunc)k_stack_init,
(pfunc)k_stack_push,
(pfunc)k_stack_pop,
/* FIFOs */
(pfunc)k_fifo_init,
(pfunc)k_fifo_put,
(pfunc)k_fifo_put_list,
(pfunc)k_fifo_put_slist,
(pfunc)k_fifo_get,
#endif
};
#endif
/** /**
* *

View file

@ -1,20 +1,20 @@
[footprint-min] [footprint-min]
tags = footprint tags = footprint unified_capable
extra_args = TEST=min extra_args = TEST=min
build_only = true build_only = true
[footprint-reg] [footprint-reg]
tags = footprint tags = footprint unified_capable
extra_args = TEST=reg extra_args = TEST=reg
build_only = true build_only = true
[footprint-max] [footprint-max]
tags = footprint tags = footprint unified_capable
extra_args = TEST=max extra_args = TEST=max
build_only = true build_only = true
[footprint-float] [footprint-float]
tags = footprint tags = footprint unified_capable
extra_args = TEST=float extra_args = TEST=float
build_only = true build_only = true
arch_whitelist = x86 arch_whitelist = x86