[rtems-docs commit] c-user: Add SMP profiling

Sebastian Huber sebh at rtems.org
Fri Feb 3 12:58:33 UTC 2017


Module:    rtems-docs
Branch:    master
Commit:    0874d7dd594dab1a7214c66117eb25db57fc5c02
Changeset: http://git.rtems.org/rtems-docs/commit/?id=0874d7dd594dab1a7214c66117eb25db57fc5c02

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb  3 13:58:19 2017 +0100

c-user: Add SMP profiling

---

 c-user/symmetric_multiprocessing_services.rst | 58 +++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/c-user/symmetric_multiprocessing_services.rst b/c-user/symmetric_multiprocessing_services.rst
index 80e3f8c..b043bf8 100644
--- a/c-user/symmetric_multiprocessing_services.rst
+++ b/c-user/symmetric_multiprocessing_services.rst
@@ -2,6 +2,7 @@
 
 .. COMMENT: COPYRIGHT (c) 2014.
 .. COMMENT: On-Line Applications Research Corporation (OAR).
+.. COMMENT: Copyright (c) 2017 embedded brains GmbH.
 .. COMMENT: All rights reserved.
 
 Symmetric Multiprocessing (SMP)
@@ -599,6 +600,63 @@ processors.
    :width: 400
    :align: center
 
+Profiling
+---------
+
+To identify the bottlenecks in the system, support for profiling of low-level
+synchronization is optionally available.  The profiling support is a BSP build
+time configuration option (``--enable-profiling``) and is implemented with an
+acceptable overhead, even for production systems.  A low-overhead counter for
+short time intervals must be provided by the hardware.
+
+Profiling reports are generated in XML for most test programs of the RTEMS
+testsuite (more than 500 test programs).  This gives a good sample set for
+statistics.  For example the maximum thread dispatch disable time, the maximum
+interrupt latency or lock contention can be determined.
+
+.. code-block:: xml
+
+   <ProfilingReport name="SMPMIGRATION 1">
+     <PerCPUProfilingReport processorIndex="0">
+       <MaxThreadDispatchDisabledTime unit="ns">36636</MaxThreadDispatchDisabledTime>
+       <MeanThreadDispatchDisabledTime unit="ns">5065</MeanThreadDispatchDisabledTime>
+       <TotalThreadDispatchDisabledTime unit="ns">3846635988
+         </TotalThreadDispatchDisabledTime>
+       <ThreadDispatchDisabledCount>759395</ThreadDispatchDisabledCount>
+       <MaxInterruptDelay unit="ns">8772</MaxInterruptDelay>
+       <MaxInterruptTime unit="ns">13668</MaxInterruptTime>
+       <MeanInterruptTime unit="ns">6221</MeanInterruptTime>
+       <TotalInterruptTime unit="ns">6757072</TotalInterruptTime>
+       <InterruptCount>1086</InterruptCount>
+     </PerCPUProfilingReport>
+     <PerCPUProfilingReport processorIndex="1">
+       <MaxThreadDispatchDisabledTime unit="ns">39408</MaxThreadDispatchDisabledTime>
+       <MeanThreadDispatchDisabledTime unit="ns">5060</MeanThreadDispatchDisabledTime>
+       <TotalThreadDispatchDisabledTime unit="ns">3842749508
+         </TotalThreadDispatchDisabledTime>
+       <ThreadDispatchDisabledCount>759391</ThreadDispatchDisabledCount>
+       <MaxInterruptDelay unit="ns">8412</MaxInterruptDelay>
+       <MaxInterruptTime unit="ns">15868</MaxInterruptTime>
+       <MeanInterruptTime unit="ns">3525</MeanInterruptTime>
+       <TotalInterruptTime unit="ns">3814476</TotalInterruptTime>
+       <InterruptCount>1082</InterruptCount>
+     </PerCPUProfilingReport>
+     <!-- more reports omitted --->
+     <SMPLockProfilingReport name="Scheduler">
+       <MaxAcquireTime unit="ns">7092</MaxAcquireTime>
+       <MaxSectionTime unit="ns">10984</MaxSectionTime>
+       <MeanAcquireTime unit="ns">2320</MeanAcquireTime>
+       <MeanSectionTime unit="ns">199</MeanSectionTime>
+       <TotalAcquireTime unit="ns">3523939244</TotalAcquireTime>
+       <TotalSectionTime unit="ns">302545596</TotalSectionTime>
+       <UsageCount>1518758</UsageCount>
+       <ContentionCount initialQueueLength="0">759399</ContentionCount>
+       <ContentionCount initialQueueLength="1">759359</ContentionCount>
+       <ContentionCount initialQueueLength="2">0</ContentionCount>
+       <ContentionCount initialQueueLength="3">0</ContentionCount>
+     </SMPLockProfilingReport>
+   </ProfilingReport>
+
 Scheduler Helping Protocol
 --------------------------
 




More information about the vc mailing list