summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tmcontext01
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/tmtests/tmcontext01')
-rw-r--r--testsuites/tmtests/tmcontext01/init.c120
-rw-r--r--testsuites/tmtests/tmcontext01/plot.py104
-rw-r--r--testsuites/tmtests/tmcontext01/tmcontext01.scn379
3 files changed, 243 insertions, 360 deletions
diff --git a/testsuites/tmtests/tmcontext01/init.c b/testsuites/tmtests/tmcontext01/init.c
index d1f88e045a..dc1da718c7 100644
--- a/testsuites/tmtests/tmcontext01/init.c
+++ b/testsuites/tmtests/tmcontext01/init.c
@@ -1,15 +1,28 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/*
- * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
@@ -36,8 +49,6 @@ const char rtems_test_name[] = "TMCONTEXT 1";
static rtems_counter_ticks t[SAMPLES];
-static volatile int prevent_optimization;
-
static size_t cache_line_size;
static size_t data_size;
@@ -59,43 +70,31 @@ static int dirty_data_cache(volatile int *data, size_t n, size_t clsz, int j)
return i + j;
}
-static int call_at_level(
+static __attribute__((__noipa__)) void call_at_level(
int start,
int fl,
- int s,
- bool dirty
+ int s
)
{
- int prevent_optimization;;
-
- prevent_optimization = start + fl;
-
+#if defined(__sparc__)
if (fl == start) {
- /*
- * Some architectures like the SPARC have register windows. A side-effect
- * of this context switch is that we start with a fresh window set. On
- * architectures like ARM or PowerPC this context switch has no effect.
- */
- _Context_Switch(&ctx, &ctx);
+ /* Flush register windows */
+ __asm__ volatile ("ta 3" : : : "memory");
}
+#endif
if (fl > 0) {
call_at_level(
start,
fl - 1,
- s,
- dirty
+ s
);
+ __asm__ volatile ("" : : : "memory");
} else {
char *volatile space;
rtems_counter_ticks a;
rtems_counter_ticks b;
- if (dirty) {
- dirty_data_cache(main_data, data_size, cache_line_size, fl);
- rtems_cache_invalidate_entire_instruction();
- }
-
a = rtems_counter_read();
/* Ensure that we use an untouched stack area */
@@ -107,8 +106,6 @@ static int call_at_level(
b = rtems_counter_read();
t[s] = rtems_counter_difference(b, a);
}
-
- return prevent_optimization;
}
static void load_task(rtems_task_argument arg)
@@ -136,7 +133,7 @@ static void sort_t(void)
qsort(&t[0], SAMPLES, sizeof(t[0]), cmp);
}
-static void test_by_function_level(int fl, bool dirty)
+static __attribute__((__noipa__)) void test_by_function_level(int fl, bool dirty)
{
RTEMS_INTERRUPT_LOCK_DECLARE(, lock)
rtems_interrupt_lock_context lock_context;
@@ -147,13 +144,16 @@ static void test_by_function_level(int fl, bool dirty)
uint64_t q3;
uint64_t max;
- fl += prevent_optimization;
-
rtems_interrupt_lock_initialize(&lock, "test");
rtems_interrupt_lock_acquire(&lock, &lock_context);
for (s = 0; s < SAMPLES; ++s) {
- call_at_level(fl, fl, s, dirty);
+ if (dirty) {
+ dirty_data_cache(main_data, data_size, cache_line_size, fl);
+ rtems_cache_invalidate_entire_instruction();
+ }
+
+ call_at_level(fl, fl, s);
}
rtems_interrupt_lock_release(&lock, &lock_context);
@@ -168,14 +168,8 @@ static void test_by_function_level(int fl, bool dirty)
max = t[SAMPLES - 1];
printf(
- " <Sample functionNestLevel=\"%i\">\n"
- " <Min unit=\"ns\">%" PRIu64 "</Min>"
- "<Q1 unit=\"ns\">%" PRIu64 "</Q1>"
- "<Q2 unit=\"ns\">%" PRIu64 "</Q2>"
- "<Q3 unit=\"ns\">%" PRIu64 "</Q3>"
- "<Max unit=\"ns\">%" PRIu64 "</Max>\n"
- " </Sample>\n",
- fl,
+ "%s\n [%" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 "]",
+ fl == 0 ? "" : ",",
rtems_counter_ticks_to_nanoseconds(min),
rtems_counter_ticks_to_nanoseconds(q1),
rtems_counter_ticks_to_nanoseconds(q2),
@@ -184,26 +178,38 @@ static void test_by_function_level(int fl, bool dirty)
);
}
-static void test(bool dirty, uint32_t load)
+static void test(bool first, bool dirty, uint32_t load)
{
int fl;
printf(
- " <ContextSwitchTest environment=\"%s\"",
- dirty ? "dirty" : "normal"
+ "\n %s{\n"
+ " \"environment\": \"",
+ first ? "" : "}, "
);
- if (load > 0) {
- printf(" load=\"%" PRIu32 "\"", load);
+ if (dirty) {
+ if (load > 0) {
+ printf("Load/%" PRIu32 "", load);
+ } else {
+ printf("DirtyCache");
+ }
+ } else {
+ printf("HotCache");
}
- printf(">\n");
+ printf(
+ "\",\n"
+ " \"stats-by-function-nest-level\": ["
+ );
for (fl = 0; fl < FUNCTION_LEVELS; ++fl) {
test_by_function_level(fl, dirty);
}
- printf(" </ContextSwitchTest>\n");
+ printf(
+ "\n ]"
+ );
}
static void Init(rtems_task_argument arg)
@@ -212,7 +218,7 @@ static void Init(rtems_task_argument arg)
TEST_BEGIN();
- printf("<Test>\n");
+ printf("*** BEGIN OF JSON DATA ***\n[");
cache_line_size = rtems_cache_get_data_line_size();
if (cache_line_size == 0) {
@@ -227,8 +233,8 @@ static void Init(rtems_task_argument arg)
main_data = malloc(data_size);
rtems_test_assert(main_data != NULL);
- test(false, load);
- test(true, load);
+ test(true, false, load);
+ test(false, true, load);
for (load = 1; load < rtems_scheduler_get_processor_maximum(); ++load) {
rtems_status_code sc;
@@ -253,10 +259,10 @@ static void Init(rtems_task_argument arg)
sc = rtems_task_start(id, load_task, (rtems_task_argument) load_data);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- test(true, load);
+ test(false, true, load);
}
- printf("</Test>\n");
+ printf("\n }\n]\n*** END OF JSON DATA ***\n");
TEST_END();
rtems_test_exit(0);
diff --git a/testsuites/tmtests/tmcontext01/plot.py b/testsuites/tmtests/tmcontext01/plot.py
index 431725c8ba..944a5962c2 100644
--- a/testsuites/tmtests/tmcontext01/plot.py
+++ b/testsuites/tmtests/tmcontext01/plot.py
@@ -1,51 +1,59 @@
+# SPDX-License-Identifier: BSD-2-Clause
+
+# Copyright (C) 2014, 2024 embedded brains GmbH & Co. KG
#
-# Copyright (c) 2014 embedded brains GmbH. All rights reserved.
-#
-# The license and distribution terms for this file may be
-# found in the file LICENSE in this distribution or at
-# http://www.rtems.org/license/LICENSE.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+import json
+import re
+import matplotlib.pyplot as plt # type: ignore
+from matplotlib import ticker # type: ignore
+
+
+def _plot(data: dict) -> None:
+ _, axes = plt.subplots()
+ axes.set_title("Context Switch Timing Test")
+ axes.set_xlabel("Function Nest Level")
+ axes.set_ylabel("Context Switch Time [μs]")
+ x = list(range(0, len(data[0]["stats-by-function-nest-level"])))
+ axes.xaxis.set_major_locator(ticker.FixedLocator(x))
+ for samples in data:
+ y = [
+ values[2] / 1000.0
+ for values in samples["stats-by-function-nest-level"]
+ ]
+ axes.plot(x, y, label=samples["environment"], marker='o')
+ axes.legend(loc='best')
+ plt.savefig("tmcontext01.png")
+ plt.savefig("tmcontext01.pdf")
+ plt.close()
+
+
+_JSON_DATA = re.compile(
+ r"\*\*\* BEGIN OF JSON DATA \*\*\*(.*)"
+ r"\*\*\* END OF JSON DATA \*\*\*", re.DOTALL)
+
+with open("tmcontext01.scn", "r", encoding="utf-8") as src:
+ match = _JSON_DATA.search(src.read())
+ data = json.loads(match.group(1))
-import libxml2
-from libxml2 import xmlNode
-import matplotlib.pyplot as plt
-doc = libxml2.parseFile("tmcontext01.scn")
-ctx = doc.xpathNewContext()
-
-colors = ['k', 'r', 'b', 'g', 'y', 'm']
-
-def plot(y, color, label, first):
- n=len(y)
- x=range(0, n)
- if first:
- plt.plot(x, y, color=color, label=label)
- else:
- plt.plot(x, y, color=color)
-
-plt.title("context switch timing test")
-plt.xlabel('function nest level')
-plt.ylabel('context switch time [ns]')
-
-c = 0
-for e in ["normal", "dirty"]:
- first = True
- for i in ["Min", "Q1", "Q2", "Q3", "Max"]:
- y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='" + e + "' and not(@load)]/Sample/" + i))
- plot(y, colors[c], e, first)
- first = False
- c = c + 1
-load = 1
-while load > 0:
- first = True
- for i in ["Min", "Q1", "Q2", "Q3", "Max"]:
- y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='dirty' and @load='" + str(load) + "']/Sample/" + i))
- if len(y) > 0:
- plot(y, colors[c], "load " + str(load), first)
- first = False
- else:
- load = 0
- if load > 0:
- load = load + 1
- c = c + 1
-plt.legend()
-plt.show()
+_plot(data)
diff --git a/testsuites/tmtests/tmcontext01/tmcontext01.scn b/testsuites/tmtests/tmcontext01/tmcontext01.scn
index 9044619319..8347d8b3fb 100644
--- a/testsuites/tmtests/tmcontext01/tmcontext01.scn
+++ b/testsuites/tmtests/tmcontext01/tmcontext01.scn
@@ -1,255 +1,124 @@
-<?xml version="1.0"?>
-<!-- *** TEST TMCONTEXT 1 *** -->
-<Test>
- <ContextSwitchTest environment="normal">
- <Sample functionNestLevel="0">
- <Min unit="ns">2440</Min><Q1 unit="ns">2440</Q1><Q2 unit="ns">2480</Q2><Q3 unit="ns">2480</Q3><Max unit="ns">2800</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">3520</Min><Q1 unit="ns">3760</Q1><Q2 unit="ns">3800</Q2><Q3 unit="ns">3800</Q3><Max unit="ns">4120</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">4280</Min><Q1 unit="ns">4720</Q1><Q2 unit="ns">4720</Q2><Q3 unit="ns">5040</Q3><Max unit="ns">5080</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">5320</Min><Q1 unit="ns">5640</Q1><Q2 unit="ns">5680</Q2><Q3 unit="ns">5960</Q3><Max unit="ns">6000</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">6360</Min><Q1 unit="ns">6600</Q1><Q2 unit="ns">6600</Q2><Q3 unit="ns">6920</Q3><Max unit="ns">6920</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">7480</Min><Q1 unit="ns">7520</Q1><Q2 unit="ns">7840</Q2><Q3 unit="ns">7840</Q3><Max unit="ns">7880</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">8480</Min><Q1 unit="ns">8480</Q1><Q2 unit="ns">8800</Q2><Q3 unit="ns">8800</Q3><Max unit="ns">8840</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">8840</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">8960</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">8800</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9280</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9320</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">9240</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">8920</Min><Q1 unit="ns">8960</Q1><Q2 unit="ns">8960</Q2><Q3 unit="ns">9280</Q3><Max unit="ns">9280</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty">
- <Sample functionNestLevel="0">
- <Min unit="ns">9720</Min><Q1 unit="ns">10560</Q1><Q2 unit="ns">10600</Q2><Q3 unit="ns">10680</Q3><Max unit="ns">11160</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">11840</Min><Q1 unit="ns">12280</Q1><Q2 unit="ns">12560</Q2><Q3 unit="ns">12600</Q3><Max unit="ns">12640</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">12880</Min><Q1 unit="ns">13560</Q1><Q2 unit="ns">13600</Q2><Q3 unit="ns">13640</Q3><Max unit="ns">13680</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">13960</Min><Q1 unit="ns">14640</Q1><Q2 unit="ns">14680</Q2><Q3 unit="ns">14720</Q3><Max unit="ns">14720</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">15000</Min><Q1 unit="ns">15680</Q1><Q2 unit="ns">15760</Q2><Q3 unit="ns">15760</Q3><Max unit="ns">15800</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">16320</Min><Q1 unit="ns">16720</Q1><Q2 unit="ns">16800</Q2><Q3 unit="ns">16800</Q3><Max unit="ns">17040</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">17320</Min><Q1 unit="ns">17560</Q1><Q2 unit="ns">17800</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">17440</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">17400</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18120</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">17320</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">17360</Min><Q1 unit="ns">17840</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18160</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">17760</Min><Q1 unit="ns">17840</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">17360</Min><Q1 unit="ns">17800</Q1><Q2 unit="ns">17840</Q2><Q3 unit="ns">17880</Q3><Max unit="ns">18200</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="1">
- <Sample functionNestLevel="0">
- <Min unit="ns">23800</Min><Q1 unit="ns">24440</Q1><Q2 unit="ns">24640</Q2><Q3 unit="ns">24720</Q3><Max unit="ns">25080</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">28040</Min><Q1 unit="ns">28560</Q1><Q2 unit="ns">28640</Q2><Q3 unit="ns">28680</Q3><Max unit="ns">28720</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">31600</Min><Q1 unit="ns">32160</Q1><Q2 unit="ns">32160</Q2><Q3 unit="ns">32200</Q3><Max unit="ns">32280</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">35400</Min><Q1 unit="ns">35720</Q1><Q2 unit="ns">35760</Q2><Q3 unit="ns">35920</Q3><Max unit="ns">36080</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">38960</Min><Q1 unit="ns">39280</Q1><Q2 unit="ns">39320</Q2><Q3 unit="ns">39560</Q3><Max unit="ns">39640</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">42480</Min><Q1 unit="ns">42840</Q1><Q2 unit="ns">43080</Q2><Q3 unit="ns">43120</Q3><Max unit="ns">43200</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">46120</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46880</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46760</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">46320</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">47040</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">46040</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46960</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">45960</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46960</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">46040</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46720</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46920</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">46080</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46720</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">46280</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">46760</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">46360</Min><Q1 unit="ns">46600</Q1><Q2 unit="ns">46640</Q2><Q3 unit="ns">46680</Q3><Max unit="ns">47040</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="2">
- <Sample functionNestLevel="0">
- <Min unit="ns">37560</Min><Q1 unit="ns">38200</Q1><Q2 unit="ns">38240</Q2><Q3 unit="ns">38480</Q3><Max unit="ns">38600</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">44880</Min><Q1 unit="ns">45480</Q1><Q2 unit="ns">45560</Q2><Q3 unit="ns">45600</Q3><Max unit="ns">45640</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">50920</Min><Q1 unit="ns">51560</Q1><Q2 unit="ns">51600</Q2><Q3 unit="ns">51800</Q3><Max unit="ns">51960</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">57320</Min><Q1 unit="ns">57640</Q1><Q2 unit="ns">57880</Q2><Q3 unit="ns">57920</Q3><Max unit="ns">58240</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">63320</Min><Q1 unit="ns">63920</Q1><Q2 unit="ns">63960</Q2><Q3 unit="ns">64000</Q3><Max unit="ns">64600</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">69840</Min><Q1 unit="ns">69960</Q1><Q2 unit="ns">70040</Q2><Q3 unit="ns">70240</Q3><Max unit="ns">70400</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">75600</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76880</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">75440</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76840</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">75640</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">75640</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76440</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">75920</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76400</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">75600</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76920</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">75360</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76440</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">75360</Min><Q1 unit="ns">76200</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">75640</Min><Q1 unit="ns">76160</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76960</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">75960</Min><Q1 unit="ns">76240</Q1><Q2 unit="ns">76280</Q2><Q3 unit="ns">76320</Q3><Max unit="ns">76400</Max>
- </Sample>
- </ContextSwitchTest>
- <ContextSwitchTest environment="dirty" load="3">
- <Sample functionNestLevel="0">
- <Min unit="ns">52400</Min><Q1 unit="ns">52480</Q1><Q2 unit="ns">52520</Q2><Q3 unit="ns">52800</Q3><Max unit="ns">53720</Max>
- </Sample>
- <Sample functionNestLevel="1">
- <Min unit="ns">61680</Min><Q1 unit="ns">62600</Q1><Q2 unit="ns">62640</Q2><Q3 unit="ns">62680</Q3><Max unit="ns">62800</Max>
- </Sample>
- <Sample functionNestLevel="2">
- <Min unit="ns">70160</Min><Q1 unit="ns">71160</Q1><Q2 unit="ns">71360</Q2><Q3 unit="ns">71480</Q3><Max unit="ns">72160</Max>
- </Sample>
- <Sample functionNestLevel="3">
- <Min unit="ns">79000</Min><Q1 unit="ns">79960</Q1><Q2 unit="ns">80000</Q2><Q3 unit="ns">80000</Q3><Max unit="ns">80920</Max>
- </Sample>
- <Sample functionNestLevel="4">
- <Min unit="ns">87600</Min><Q1 unit="ns">88480</Q1><Q2 unit="ns">88760</Q2><Q3 unit="ns">88800</Q3><Max unit="ns">88880</Max>
- </Sample>
- <Sample functionNestLevel="5">
- <Min unit="ns">96320</Min><Q1 unit="ns">97280</Q1><Q2 unit="ns">97320</Q2><Q3 unit="ns">97360</Q3><Max unit="ns">98600</Max>
- </Sample>
- <Sample functionNestLevel="6">
- <Min unit="ns">105160</Min><Q1 unit="ns">105840</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107120</Max>
- </Sample>
- <Sample functionNestLevel="7">
- <Min unit="ns">105200</Min><Q1 unit="ns">106040</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107080</Max>
- </Sample>
- <Sample functionNestLevel="8">
- <Min unit="ns">104880</Min><Q1 unit="ns">105920</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="9">
- <Min unit="ns">105760</Min><Q1 unit="ns">106000</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="10">
- <Min unit="ns">104880</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">107080</Max>
- </Sample>
- <Sample functionNestLevel="11">
- <Min unit="ns">105720</Min><Q1 unit="ns">105960</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106240</Max>
- </Sample>
- <Sample functionNestLevel="12">
- <Min unit="ns">104960</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="13">
- <Min unit="ns">104880</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- <Sample functionNestLevel="14">
- <Min unit="ns">105720</Min><Q1 unit="ns">105880</Q1><Q2 unit="ns">106080</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106240</Max>
- </Sample>
- <Sample functionNestLevel="15">
- <Min unit="ns">104920</Min><Q1 unit="ns">105840</Q1><Q2 unit="ns">106120</Q2><Q3 unit="ns">106160</Q3><Max unit="ns">106280</Max>
- </Sample>
- </ContextSwitchTest>
-</Test>
-<!-- *** END OF TEST TMCONTEXT 1 *** -->
+
+ SIS - SPARC/RISCV instruction simulator 2.30, copyright Jiri Gaisler 2020
+ Bug-reports to jiri@gaisler.se
+
+ GR740/LEON4 emulation enabled, 4 cpus online, delta 50 clocks
+
+ Loaded build/sparc/gr740/testsuites/tmtests/tmcontext01.exe, entry 0x00000000
+
+
+*** BEGIN OF TEST TMCONTEXT 1 ***
+*** TEST VERSION: 6.0.0.aa07dc10645c3dc855c3df2b53520aebc2751b06
+*** TEST STATE: EXPECTED_PASS
+*** TEST BUILD: RTEMS_SMP
+*** TEST TOOLS: 13.2.0 20230727 (RTEMS 6, RSB d3d738c35a71ca05f675b188539225099401ac79, Newlib a021448)
+*** BEGIN OF JSON DATA ***
+[
+ {
+ "environment": "HotCache",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "DirtyCache",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/1",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/2",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }, {
+ "environment": "Load/3",
+ "stats-by-function-nest-level": [
+ [2820, 2820, 2820, 2820, 2820],
+ [3640, 3640, 3640, 3640, 3640],
+ [4460, 4460, 4460, 4460, 4460],
+ [5280, 5280, 5280, 5280, 5280],
+ [6100, 6100, 6100, 6100, 6100],
+ [6920, 6920, 6920, 6920, 6920],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740],
+ [7740, 7740, 7740, 7740, 7740]
+ ]
+ }
+]
+*** END OF JSON DATA ***
+
+*** END OF TEST TMCONTEXT 1 ***
+
+cpu 3 in error mode (tt = 0x80)
+ 2081487650 00009060: 91d02000 ta 0x0