[PATCH 06/10] validation: Add group for runtime measurements

Sebastian Huber sebastian.huber at embedded-brains.de
Mon May 8 20:11:57 UTC 2023


Update #3716.
---
 .../validation/tc-barrier-performance.c       | 36 ++++++++
 testsuites/validation/tc-event-performance.c  | 42 +++++++++
 .../validation/tc-message-performance.c       | 62 +++++++++++++
 testsuites/validation/tc-part-performance.c   | 26 ++++++
 testsuites/validation/tc-sem-performance.c    | 70 +++++++++++++++
 testsuites/validation/tc-task-performance.c   | 86 +++++++++++++++++++
 6 files changed, 322 insertions(+)

diff --git a/testsuites/validation/tc-barrier-performance.c b/testsuites/validation/tc-barrier-performance.c
index 5b6b4a24bb..051aaa0f66 100644
--- a/testsuites/validation/tc-barrier-performance.c
+++ b/testsuites/validation/tc-barrier-performance.c
@@ -159,6 +159,13 @@ static T_fixture RtemsBarrierValPerf_Fixture = {
   .initial_context = &RtemsBarrierValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseAuto \
+ *   spec:/rtems/barrier/req/perf-release-auto
+ *
+ * @{
+ */
+
 /**
  * @brief Create an automatic release barrier.
  */
@@ -244,7 +251,16 @@ static void RtemsBarrierReqPerfReleaseAuto_Cleanup(
   T_rsc_success( sc );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseAutoOtherCpu \
+ *   spec:/rtems/barrier/req/perf-release-auto-other-cpu
+ *
+ * @{
+ */
+
 /**
  * @brief Create an automatic release barrier.  Create and start a worker task.
  */
@@ -341,8 +357,17 @@ static void RtemsBarrierReqPerfReleaseAutoOtherCpu_Cleanup(
   sc = rtems_barrier_delete( ctx->barrier_id );
   T_rsc_success( sc );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseManual \
+ *   spec:/rtems/barrier/req/perf-release-manual
+ *
+ * @{
+ */
+
 /**
  * @brief Create a manual release barrier.  Create and start a worker task.
  */
@@ -456,6 +481,15 @@ static void RtemsBarrierReqPerfReleaseManual_Cleanup(
   RestoreRunnerPriority();
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsBarrierReqPerfReleaseManualPreempt \
+ *   spec:/rtems/barrier/req/perf-release-manual-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Create a manual release barrier.  Create and start a worker task.
  */
@@ -555,6 +589,8 @@ static void RtemsBarrierReqPerfReleaseManualPreempt_Cleanup(
   RestoreRunnerPriority();
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsBarrierValPerf( void )
  */
diff --git a/testsuites/validation/tc-event-performance.c b/testsuites/validation/tc-event-performance.c
index de29cdd1b5..052eee3894 100644
--- a/testsuites/validation/tc-event-performance.c
+++ b/testsuites/validation/tc-event-performance.c
@@ -209,6 +209,12 @@ static T_fixture RtemsEventValPerf_Fixture = {
   .initial_context = &RtemsEventValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsEventReqPerfIsrPreempt spec:/rtems/event/req/perf-isr-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Send two events from with interrupt context.  Satisfy the event
  *   condition.
@@ -259,6 +265,14 @@ static bool RtemsEventReqPerfIsrPreempt_Teardown_Wrap(
   return RtemsEventReqPerfIsrPreempt_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsEventReqPerfOther spec:/rtems/event/req/perf-other
+ *
+ * @{
+ */
+
 /**
  * @brief Lower the worker priority.
  */
@@ -324,7 +338,15 @@ static bool RtemsEventReqPerfOther_Teardown_Wrap(
   return RtemsEventReqPerfOther_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsEventReqPerfOtherCpu spec:/rtems/event/req/perf-other-cpu
+ *
+ * @{
+ */
+
 /**
  * @brief Move worker to scheduler B.
  */
@@ -391,8 +413,17 @@ static void RtemsEventReqPerfOtherCpu_Cleanup( RtemsEventValPerf_Context *ctx )
 {
   SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsEventReqPerfOtherNotSatisfied \
+ *   spec:/rtems/event/req/perf-other-not-satisfied
+ *
+ * @{
+ */
+
 /**
  * @brief Send an event.  Do not satisfy the event condition.
  */
@@ -450,6 +481,15 @@ static bool RtemsEventReqPerfOtherNotSatisfied_Teardown_Wrap(
   );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsEventReqPerfOtherPreempt \
+ *   spec:/rtems/event/req/perf-other-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Send two events.  Satisfy the event condition.
  */
@@ -502,6 +542,8 @@ static bool RtemsEventReqPerfOtherPreempt_Teardown_Wrap(
   return RtemsEventReqPerfOtherPreempt_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsEventValPerf( void )
  */
diff --git a/testsuites/validation/tc-message-performance.c b/testsuites/validation/tc-message-performance.c
index 5d3e0527e0..35f4622bae 100644
--- a/testsuites/validation/tc-message-performance.c
+++ b/testsuites/validation/tc-message-performance.c
@@ -278,6 +278,13 @@ static T_fixture RtemsMessageValPerf_Fixture = {
   .initial_context = &RtemsMessageValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsMessageReqPerfReceiveTry \
+ *   spec:/rtems/message/req/perf-receive-try
+ *
+ * @{
+ */
+
 /**
  * @brief Try to receive a message.
  */
@@ -335,6 +342,15 @@ static bool RtemsMessageReqPerfReceiveTry_Teardown_Wrap(
   return RtemsMessageReqPerfReceiveTry_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfReceiveWaitForever \
+ *   spec:/rtems/message/req/perf-receive-wait-forever
+ *
+ * @{
+ */
+
 /**
  * @brief Schedule a message send.
  */
@@ -422,6 +438,15 @@ static bool RtemsMessageReqPerfReceiveWaitForever_Teardown_Wrap(
   );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfReceiveWaitTimed \
+ *   spec:/rtems/message/req/perf-receive-wait-timed
+ *
+ * @{
+ */
+
 /**
  * @brief Schedule a message send.
  */
@@ -509,6 +534,14 @@ static bool RtemsMessageReqPerfReceiveWaitTimed_Teardown_Wrap(
   );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfSend spec:/rtems/message/req/perf-send
+ *
+ * @{
+ */
+
 /**
  * @brief Send a message.
  */
@@ -567,6 +600,15 @@ static bool RtemsMessageReqPerfSend_Teardown_Wrap(
   return RtemsMessageReqPerfSend_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsMessageReqPerfSendOther \
+ *   spec:/rtems/message/req/perf-send-other
+ *
+ * @{
+ */
+
 /**
  * @brief Let the worker wait on the message queue.
  */
@@ -641,7 +683,16 @@ static bool RtemsMessageReqPerfSendOther_Teardown_Wrap(
   return RtemsMessageReqPerfSendOther_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsMessageReqPerfSendOtherCpu \
+ *   spec:/rtems/message/req/perf-send-other-cpu
+ *
+ * @{
+ */
+
 /**
  * @brief Move worker to scheduler B.
  */
@@ -743,8 +794,17 @@ static void RtemsMessageReqPerfSendOtherCpu_Cleanup(
 {
   SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsMessageReqPerfSendPreempt \
+ *   spec:/rtems/message/req/perf-send-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Let the worker wait on the message queue.
  */
@@ -825,6 +885,8 @@ static bool RtemsMessageReqPerfSendPreempt_Teardown_Wrap(
   );
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsMessageValPerf( void )
  */
diff --git a/testsuites/validation/tc-part-performance.c b/testsuites/validation/tc-part-performance.c
index 7acc713816..151d323f1c 100644
--- a/testsuites/validation/tc-part-performance.c
+++ b/testsuites/validation/tc-part-performance.c
@@ -212,6 +212,12 @@ static T_fixture RtemsPartValPerf_Fixture = {
   .initial_context = &RtemsPartValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsPartReqPerfGetBuffer spec:/rtems/part/req/perf-get-buffer
+ *
+ * @{
+ */
+
 /**
  * @brief Get a buffer.
  */
@@ -263,6 +269,15 @@ static bool RtemsPartReqPerfGetBuffer_Teardown_Wrap(
   return RtemsPartReqPerfGetBuffer_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsPartReqPerfGetNoBuffer \
+ *   spec:/rtems/part/req/perf-get-no-buffer
+ *
+ * @{
+ */
+
 /**
  * @brief Get the buffer.
  */
@@ -335,6 +350,15 @@ static void RtemsPartReqPerfGetNoBuffer_Cleanup(
   T_rsc_success( sc );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsPartReqPerfReturnBuffer \
+ *   spec:/rtems/part/req/perf-return-buffer
+ *
+ * @{
+ */
+
 /**
  * @brief Get the buffer.
  */
@@ -400,6 +424,8 @@ static bool RtemsPartReqPerfReturnBuffer_Teardown_Wrap(
   return RtemsPartReqPerfReturnBuffer_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsPartValPerf( void )
  */
diff --git a/testsuites/validation/tc-sem-performance.c b/testsuites/validation/tc-sem-performance.c
index 3274103f1c..603a74b7ad 100644
--- a/testsuites/validation/tc-sem-performance.c
+++ b/testsuites/validation/tc-sem-performance.c
@@ -237,6 +237,12 @@ static T_fixture RtemsSemValPerf_Fixture = {
   .initial_context = &RtemsSemValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsSemReqPerfMtxPiObtain spec:/rtems/sem/req/perf-mtx-pi-obtain
+ *
+ * @{
+ */
+
 /**
  * @brief Obtain the available mutex.
  */
@@ -289,6 +295,15 @@ static bool RtemsSemReqPerfMtxPiObtain_Teardown_Wrap(
   return RtemsSemReqPerfMtxPiObtain_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiRelease \
+ *   spec:/rtems/sem/req/perf-mtx-pi-release
+ *
+ * @{
+ */
+
 /**
  * @brief Obtain the mutex.
  */
@@ -351,6 +366,15 @@ static bool RtemsSemReqPerfMtxPiRelease_Teardown_Wrap(
   return RtemsSemReqPerfMtxPiRelease_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleaseOne \
+ *   spec:/rtems/sem/req/perf-mtx-pi-release-one
+ *
+ * @{
+ */
+
 /**
  * @brief Let one task wait on the mutex.
  */
@@ -427,7 +451,16 @@ static bool RtemsSemReqPerfMtxPiReleaseOne_Teardown_Wrap(
   );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleaseOtherCpu \
+ *   spec:/rtems/sem/req/perf-mtx-pi-release-other-cpu
+ *
+ * @{
+ */
+
 /**
  * @brief Move worker to scheduler B.
  */
@@ -526,8 +559,17 @@ static void RtemsSemReqPerfMtxPiReleaseOtherCpu_Cleanup(
 {
   SetScheduler( ctx->worker_id, SCHEDULER_A_ID, PRIO_HIGH );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsSemReqPerfMtxPiReleasePreempt \
+ *   spec:/rtems/sem/req/perf-mtx-pi-release-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Let one task wait on the mutex.
  */
@@ -605,6 +647,14 @@ static bool RtemsSemReqPerfMtxPiReleasePreempt_Teardown_Wrap(
   );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiTry spec:/rtems/sem/req/perf-mtx-pi-try
+ *
+ * @{
+ */
+
 /**
  * @brief Make the mutex unavailable.
  */
@@ -667,6 +717,15 @@ static void RtemsSemReqPerfMtxPiTry_Cleanup( RtemsSemValPerf_Context *ctx )
   Send( ctx, EVENT_RELEASE );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiWaitForever \
+ *   spec:/rtems/sem/req/perf-mtx-pi-wait-forever
+ *
+ * @{
+ */
+
 /**
  * @brief Make the mutex unavailable.
  */
@@ -751,6 +810,15 @@ static bool RtemsSemReqPerfMtxPiWaitForever_Teardown_Wrap(
   );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsSemReqPerfMtxPiWaitTimed \
+ *   spec:/rtems/sem/req/perf-mtx-pi-wait-timed
+ *
+ * @{
+ */
+
 /**
  * @brief Make the mutex unavailable.
  */
@@ -825,6 +893,8 @@ static bool RtemsSemReqPerfMtxPiWaitTimed_Teardown_Wrap(
   return RtemsSemReqPerfMtxPiWaitTimed_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsSemValPerf( void )
  */
diff --git a/testsuites/validation/tc-task-performance.c b/testsuites/validation/tc-task-performance.c
index a13f745732..e0ea113e76 100644
--- a/testsuites/validation/tc-task-performance.c
+++ b/testsuites/validation/tc-task-performance.c
@@ -225,6 +225,12 @@ static T_fixture RtemsTaskValPerf_Fixture = {
   .initial_context = &RtemsTaskValPerf_Instance
 };
 
+/**
+ * @defgroup RtemsTaskReqPerfConstruct spec:/rtems/task/req/perf-construct
+ *
+ * @{
+ */
+
 /**
  * @brief Construct a worker task.
  */
@@ -274,6 +280,14 @@ static bool RtemsTaskReqPerfConstruct_Teardown_Wrap(
   return RtemsTaskReqPerfConstruct_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestart spec:/rtems/task/req/perf-restart
+ *
+ * @{
+ */
+
 /**
  * @brief Create and start a worker task.
  */
@@ -340,6 +354,15 @@ static void RtemsTaskReqPerfRestart_Cleanup( RtemsTaskValPerf_Context *ctx )
   DeleteTask( ctx->worker_id );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestartPreempt \
+ *   spec:/rtems/task/req/perf-restart-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Create and start a worker task.
  */
@@ -422,6 +445,14 @@ static void RtemsTaskReqPerfRestartPreempt_Cleanup(
   DeleteTask( ctx->worker_id );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfRestartSelf spec:/rtems/task/req/perf-restart-self
+ *
+ * @{
+ */
+
 /**
  * @brief Create and start a worker task.
  */
@@ -492,7 +523,16 @@ static void RtemsTaskReqPerfRestartSelf_Cleanup(
   DeleteTask( ctx->worker_id );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerMove \
+ *   spec:/rtems/task/req/perf-set-scheduler-move
+ *
+ * @{
+ */
+
 /**
  * @brief Set the runner affinity.
  */
@@ -572,8 +612,17 @@ static void RtemsTaskReqPerfSetSchedulerMove_Cleanup(
 {
   SetSelfAffinityOne( 0 );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerNop \
+ *   spec:/rtems/task/req/perf-set-scheduler-nop
+ *
+ * @{
+ */
+
 /**
  * @brief Set the scheduler of the runner.
  */
@@ -632,7 +681,16 @@ static bool RtemsTaskReqPerfSetSchedulerNop_Teardown_Wrap(
   );
 }
 
+/** @} */
+
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerOther \
+ *   spec:/rtems/task/req/perf-set-scheduler-other
+ *
+ * @{
+ */
+
 /**
  * @brief Create and start a worker task for scheduler B.
  */
@@ -715,9 +773,18 @@ static void RtemsTaskReqPerfSetSchedulerOther_Cleanup(
 {
   DeleteTask( ctx->worker_id );
 }
+
+/** @} */
 #endif
 
 #if defined(RTEMS_SMP)
+/**
+ * @defgroup RtemsTaskReqPerfSetSchedulerPreempt \
+ *   spec:/rtems/task/req/perf-set-scheduler-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Create and start two worker tasks for scheduler B.  Make the second
  *   worker busy.
@@ -834,8 +901,16 @@ static void RtemsTaskReqPerfSetSchedulerPreempt_Cleanup(
   DeleteTask( ctx->worker_2_id );
   DeleteTask( ctx->worker_id );
 }
+
+/** @} */
 #endif
 
+/**
+ * @defgroup RtemsTaskReqPerfStart spec:/rtems/task/req/perf-start
+ *
+ * @{
+ */
+
 /**
  * @brief Create a worker task.
  */
@@ -904,6 +979,15 @@ static bool RtemsTaskReqPerfStart_Teardown_Wrap(
   return RtemsTaskReqPerfStart_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
+/**
+ * @defgroup RtemsTaskReqPerfStartPreempt \
+ *   spec:/rtems/task/req/perf-start-preempt
+ *
+ * @{
+ */
+
 /**
  * @brief Create a worker task.
  */
@@ -975,6 +1059,8 @@ static bool RtemsTaskReqPerfStartPreempt_Teardown_Wrap(
   return RtemsTaskReqPerfStartPreempt_Teardown( ctx, delta, tic, toc, retry );
 }
 
+/** @} */
+
 /**
  * @fn void T_case_body_RtemsTaskValPerf( void )
  */
-- 
2.35.3



More information about the devel mailing list