MulticoreResponseTimeMeasurements (mSRTM) Sample

Description

This sample program runs a System Response Timer on different cores simultaneously. It measures the difference between the expected timer interval and the actual timer interval.

Each core has its own timer and its own thread allocation memory to support the timer function. The core thread creates the timer and the necessary resources, and then waits for the main thread to initiate the test with a fast semaphore to synchronize all cores as closely as possible, though the test does not synchronize results.

Source Files

File Description
mSrtm.cpp
  • Gathers thread-level timer latencies and prints out a summary and an optional histogram of results. The timer can also generate a sound on the speaker. This is a useful tool for measuring application-level response time latencies while the system is stressed by other activity, such as disk, network, and GUI IO, and/or heavy processing. Different hardware platforms can also be compared.
  • mSrtm_funcs.cpp Additional helper functions.
    mSrtm.h The header file

    Building the Sample

    1. Open a project file in the corresponding Visual Studio version you are using for development.
    2. Build the project.

    Running the Sample

    See Usage for additional options.

    To run the sample:

    1. Boot the system in its Windows Boot Configuration.
    2. Navigate to <InstallDrive>\MaxRT\eRTOS\.
    3. Right-click AutoStart.bat and select Edit.
    4. Find or write the Run command(s) for mSRTM.

    Note: For more information on Run commands, see Run.

    1. If using pre-written Run commands, remove the comment characters (: :) to enable the Run command(s).
    2. Re-boot the system from a GRUB bootable USB drive or hard drive.
    3. Select the desired GRUB boot configuration. See GRUB Boot Configurations for more information.
    4. Upon system boot, the sample(s) will run automatically after the eRTOS Kernel startup.
    5. Sample output will be displayed on the screen when the program ends.
    6. Re-boot the system in its Windows Boot Configuration.
    7. Navigate to <InstallDrive>\MaxRT\eRTOS\.
    8. Open the RtLogFile.txt log file to view sample output.

    Usage

    mSrtm | mSrtm [/?] [/h] [/s] [/1] [/f] [c] [/p x y] seconds_to_sample

    Options

    /h= Display histogram (in addition to summary).

    /s= Turn on sound (square wave driven by timer).

    /1= Use a 10 MS timer period (default is 1 MS).

    /f= Use fastest available timer (1MS or better).

    /c= Use RtGetClockTime to measure.

    /p x y= Specify the first and last processors to use (x = first, y = last).

    /?= Help on usage.

    If no parameters are given, the default is mSrtm /h /s /f 15, and timing is done on the first Process processor.

    Remarks

    The mSRTM program differs from the SRTM program in that mSRTM measures the timer periodic interval deviation from the set value, while SRTM measures the timer response latencies including APIC timer drift.

    APIs Referenced

    RTAPI

    Windows APIs