zephyr/samples/subsys/logging/kernel_event_logger
Savinay Dharmappa 4cec15270d sample: subsys: logging: kernel_event_logger: Add sample application
patch adds a sample application to demonstrate use of kernel event
logger feature.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-11-02 22:22:54 -04:00
..
src sample: subsys: logging: kernel_event_logger: Add sample application 2017-11-02 22:22:54 -04:00
Makefile sample: subsys: logging: kernel_event_logger: Add sample application 2017-11-02 22:22:54 -04:00
prj.conf sample: subsys: logging: kernel_event_logger: Add sample application 2017-11-02 22:22:54 -04:00
README.rst sample: subsys: logging: kernel_event_logger: Add sample application 2017-11-02 22:22:54 -04:00
sample.yaml sample: subsys: logging: kernel_event_logger: Add sample application 2017-11-02 22:22:54 -04:00

.. _kerneleventlogger_sample:

Kernel Event Logger Sample
################################

Overview
********

A simple application that demonstrates use of kernel event
logger feature. Two threads (A and B) of the same priority
are created and main thread is configured to have low priority,
which reads the events from kernel event logger's buffer and
prints to the console. When thread 'A' gets scheduled it will
sleep for 1 second. Similarly when thread 'B' gets scheduled
it will sleep for 0.5 seconds. When both A and B are sleeping,
the main thread gets scheduled and retrieves the events captured
from kernel event logger's buffer and prints to the console.

Building and Running
********************

This project outputs to the console.  It can be built and executed
on QEMU as follows:

.. code-block:: console

   $ cd samples/subsys/kernel_event_logger
   $ make run

Sample Output
=============

.. code-block:: console

       tid of context switched thread = 400080 at time = 96538
       tid of context switched thread = 4000c0 at time = 98047
       thread = 400080, is moved to = REDAY_Q , at time = 51019657
       thread = 400040, is moved to = REDAY_Q , at time = 51024998