add benchmark to app. TODO: test benchmark.
This commit is contained in:
parent
7c50a73bf1
commit
99c1582d27
|
@ -141,11 +141,12 @@ void *run_benchmark(void *args) {
|
||||||
|
|
||||||
pthread_t benchmark_task;
|
pthread_t benchmark_task;
|
||||||
static int embenchmark(void) {
|
static int embenchmark(void) {
|
||||||
pthread_attr_t attr;
|
// pthread_attr_t attr;
|
||||||
attr.schedparam.sched_priority = 25;
|
// attr.schedparam.sched_priority = 25;
|
||||||
attr.stacksize = 4096;
|
// attr.stacksize = 4096;
|
||||||
|
|
||||||
PrivTaskCreate(&benchmark_task, &attr, run_benchmark, NULL);
|
// PrivTaskCreate(&benchmark_task, &attr, run_benchmark, NULL);
|
||||||
|
run_benchmark(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
PRIV_SHELL_CMD_FUNCTION(embenchmark, benchmark, PRIV_SHELL_CMD_MAIN_ATTR);
|
PRIV_SHELL_CMD_FUNCTION(embenchmark, benchmark, PRIV_SHELL_CMD_MAIN_ATTR);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* See the Mulan PSL v2 for more details.
|
* See the Mulan PSL v2 for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
__STACKSIZE__ = 4096;
|
__STACKSIZE__ = 8192;
|
||||||
OUTPUT_ARCH( "riscv" )
|
OUTPUT_ARCH( "riscv" )
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
@ -41,13 +41,6 @@ SECTIONS
|
||||||
_shell_command_end = .;
|
_shell_command_end = .;
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
|
|
||||||
/* section information for embench */
|
|
||||||
. = ALIGN(8);
|
|
||||||
_benchmark_start = .;
|
|
||||||
KEEP (*(benchmark))
|
|
||||||
_benchmark_end = .;
|
|
||||||
. = ALIGN(8);
|
|
||||||
|
|
||||||
PROVIDE(__ctors_start__ = .);
|
PROVIDE(__ctors_start__ = .);
|
||||||
KEEP (*(SORT(.init_array.*)))
|
KEEP (*(SORT(.init_array.*)))
|
||||||
KEEP (*(.init_array))
|
KEEP (*(.init_array))
|
||||||
|
|
Loading…
Reference in New Issue