forked from open-vela/nuttx-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: If7ed53cfbd43a5926c1682aa71147fd725a19cdd
- Loading branch information
1 parent
048bb32
commit 98c6017
Showing
301 changed files
with
80,280 additions
and
1,867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/coremark-pro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/fio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/rt-tests | ||
/*.zip |
43 changes: 43 additions & 0 deletions
43
benchmarks/rt-tests/0001-rt-tests-cyclictest-Port-for-NuttX.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From cbd7831e20f387a35e94a50b95e0b8db5c5e63dd Mon Sep 17 00:00:00 2001 | ||
From: ouyangxiangzhen <[email protected]> | ||
Date: Mon, 8 Jul 2024 10:43:14 +0800 | ||
Subject: [PATCH] rt-tests/cyclictest: Port for NuttX | ||
|
||
VELAPLATFO-37815 | ||
|
||
This patch ports cyclictest for NuttX. | ||
|
||
Change-Id: I918da053887aaba78910e230db0169239dba3b73 | ||
Signed-off-by: ouyangxiangzhen <[email protected]> | ||
--- | ||
src/cyclictest/cyclictest.c | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c | ||
index c5c3389..0edb684 100644 | ||
--- a/src/cyclictest/cyclictest.c | ||
+++ b/src/cyclictest/cyclictest.c | ||
@@ -847,7 +847,11 @@ static void display_help(int error) | ||
static int use_nanosleep = MODE_CLOCK_NANOSLEEP; | ||
static int timermode = TIMER_ABSTIME; | ||
static int use_system; | ||
+#ifdef RTTESTS_PRIORITY | ||
+static int priority = RTTESTS_PRIORITY; | ||
+#else | ||
static int priority; | ||
+#endif | ||
static int policy = SCHED_OTHER; /* default policy if not specified */ | ||
static int num_threads = 1; | ||
static int max_cycles; | ||
@@ -1224,7 +1228,7 @@ static void process_options(int argc, char *argv[], int max_cpus) | ||
if (distance == -1) | ||
distance = DEFAULT_DISTANCE; | ||
|
||
- if (priority < 0 || priority > 99) | ||
+ if (priority < 0 || priority > 255) | ||
error = 1; | ||
|
||
if (num_threads == -1) | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# | ||
# Copyright (C) 2024 Xiaomi Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
if(CONFIG_BENCHMARK_RTTESTS) | ||
|
||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/rt-tests/.git) | ||
set(RTTESTS_URL | ||
"https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git") | ||
set(RTTESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rt-tests) | ||
|
||
execute_process( | ||
COMMAND git clone ${RTTESTS_URL} ${RTTESTS_DIR} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
RESULT_VARIABLE GIT_CLONE_RESULT) | ||
|
||
if(NOT ${GIT_CLONE_RESULT} EQUAL 0) | ||
message(FATAL_ERROR "Failed to clone rt-tests repository") | ||
endif() | ||
|
||
execute_process( | ||
COMMAND cd ${RTTESTS_DIR} && git checkout -q ${RTTESTS_VERSION} && patch | ||
-p1 < ../0001-rt-tests-cyclictest-Port-for-NuttX.patch | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
add_custom_target(distclean COMMAND ${CMAKE_COMMAND} -E remove_directory | ||
${RTTESTS_DIR}) | ||
endif() | ||
|
||
list( | ||
APPEND | ||
SRCS | ||
rt-tests/src/cyclictest/cyclictest.c | ||
rt-tests/src/lib/rt-error.c | ||
rt-tests/src/lib/histogram.c | ||
rt-tests/src/lib/rt-utils.c | ||
rt-tests/src/lib/rt-numa.c) | ||
|
||
list( | ||
APPEND | ||
CFLAGS | ||
-Irt-tests/src/include | ||
-I. | ||
-DVERSION=0.1 | ||
-DSYS_gettid=0 | ||
-Dgettid=rttest_gettid | ||
-D'syscall | ||
(x) | ||
= | ||
((pid_t) (x)) | ||
' | ||
-w | ||
-DRTTESTS_PRIORITY=${CONFIG_BENCHMARK_RTTESTS_PRIORITY}+1) | ||
|
||
nuttx_add_application( | ||
NAME | ||
cyclictest | ||
PRIORITY | ||
${CONFIG_BENCHMARK_RTTESTS_PRIORITY} | ||
STACKSIZE | ||
${CONFIG_BENCHMARK_RTTESTS_STACKSIZE} | ||
MODULE | ||
${CONFIG_BENCHMARK_RTTESTS} | ||
COMPILE_FLAGS | ||
${CFLAGS} | ||
SRCS | ||
${SRCS}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Copyright (C) 2024 Xiaomi Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
config BENCHMARK_RTTESTS | ||
tristate "RT-Tests" | ||
default n | ||
depends on PIPES && ALLOW_GPL_COMPONENTS | ||
---help--- | ||
Measure the timer jitter | ||
|
||
if BENCHMARK_RTTESTS | ||
|
||
config BENCHMARK_RTTESTS_PRIORITY | ||
int "RT-Tests task priority" | ||
default 200 | ||
|
||
config BENCHMARK_RTTESTS_STACKSIZE | ||
int "RT-Tests stack size" | ||
default DEFAULT_TASK_STACKSIZE | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Copyright (C) 2024 Xiaomi Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
ifneq ($(CONFIG_BENCHMARK_RTTESTS),) | ||
CONFIGURED_APPS += $(APPDIR)/benchmarks/rt-tests | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# | ||
# Copyright (C) 2024 Xiaomi Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
############################################################################ | ||
# Targets | ||
############################################################################ | ||
|
||
|
||
include $(APPDIR)/Make.defs | ||
|
||
PROGNAME = cyclictest | ||
PRIORITY = $(CONFIG_BENCHMARK_RTTESTS_PRIORITY) | ||
STACKSIZE = $(CONFIG_BENCHMARK_RTTESTS_STACKSIZE) | ||
MODULE = $(CONFIG_BENCHMARK_RTTESTS) | ||
|
||
RTTESTS_PATH = $(APPDIR)/benchmarks/rt-tests/rt-tests | ||
RTTESTS_URL = https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git | ||
RTTESTS_VERSION = cadd661f984c0e6717e681fdaca1ce589b0ed964 | ||
RTTESTS_GIT = rt-tests | ||
|
||
ifeq ($(wildcard rt-tests/.git),) | ||
rt-tests: | ||
@echo "Git Cloning: $(RTTESTS_URL)" | ||
$(Q) git clone $(RTTESTS_URL) | ||
@echo "Checkout commit: $(RTTESTS_VERSION)" | ||
$(Q) cd $(RTTESTS_PATH) && \ | ||
git checkout -q $(RTTESTS_VERSION) | ||
@echo "Patching: Applying patch" | ||
$(Q) cd $(RTTESTS_PATH) && \ | ||
patch -p1 < ../0001-rt-tests-cyclictest-Port-for-NuttX.patch | ||
|
||
context:: rt-tests | ||
endif | ||
|
||
distclean:: | ||
$(call DELDIR, $(RTTESTS_GIT)) | ||
|
||
MAINSRC = rt-tests/src/cyclictest/cyclictest.c | ||
CSRCS = rt-tests/src/lib/rt-error.c rt-tests/src/lib/histogram.c | ||
CSRCS += rt-tests/src/lib/rt-utils.c rt-tests/src/lib/rt-numa.c | ||
|
||
CFLAGS += -Irt-tests/src/include -I. -DVERSION=0.1 | ||
CFLAGS += -DSYS_gettid=0 -Dgettid=rttest_gettid -D'syscall(x)=((pid_t)(x))' | ||
CFLAGS += -w -DRTTESTS_PRIORITY=$(CONFIG_BENCHMARK_RTTESTS_PRIORITY)+1 | ||
|
||
include $(APPDIR)/Application.mk |
Oops, something went wrong.