zephyr/samples/nanokernel/benchmark/footprint
Yonattan Louise a8571c4b7f Fix checkpatch issue - WARNING:SPACING
Spaces between the function name and the open parenthesis are not allowed.
This commit fixes the case where only one open parenthesis with leading
whitespaces is present in the line.

	#!/bin/bash

	checkpatch_script="$VXMICRO_BASE/scripts/checkpatch.pl --mailback --no-tree -f --emacs --summary-file --show-types --ignore BRACES,PRINTK_WITHOUT_KERN_LEVEL,SPLIT_STRING --max-line-length=100 "

	for file in $(find ./ -name "*.[ch]" ! -path "./scripts/*" ! -path "./host/src/wrsconfig/*");
	do
		# fixing spaces between function name and open parenthesis
		for line in $(eval $checkpatch_script $file | grep "WARNING:SPACING: space prohibited between function name and open parenthesis '('" | cut -d":" -f2)
		do
			echo "$file : $line"
			sed -i ''$line' { /[ \t](.*[ \t](/ b skip_it s/[ \t]*(/(/ ; :skip_it }' $file;
		done;
	done;

Change-Id: I1e026eaee930e297374e5f2f725b78f29824dee3
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:13:54 -05:00
..
src Fix checkpatch issue - WARNING:SPACING 2016-02-05 20:13:54 -05:00
Makefile Remove references to unsupported stdlib functionality 2016-02-05 20:13:40 -05:00
README.txt Update minimum nanokernel footprint benchmark 2016-02-05 20:13:49 -05:00
prj_max_arm.conf First commit 2015-04-10 16:44:37 -07:00
prj_max_x86.conf First commit 2015-04-10 16:44:37 -07:00
prj_min_arc.conf First commit 2015-04-10 16:44:37 -07:00
prj_min_arm.conf First commit 2015-04-10 16:44:37 -07:00
prj_min_x86.conf Update minimum nanokernel footprint benchmark 2016-02-05 20:13:49 -05:00
prj_reg_arm.conf First commit 2015-04-10 16:44:37 -07:00
prj_reg_x86.conf First commit 2015-04-10 16:44:37 -07:00

README.txt

Title: Nanokernel footprint measurement

Description:

This project is designed to characterize the memory requirements of a
nanokernel-only image running on a Pentium4 target.


The project can be built using several configurations:

minimal (a "do nothing" image that has support for few kernel capabilities)
-------
- Background task is only task in system; no fibers are utilized.
- Background task simply runs an endless loop that increments a global variable.
- No system timer support.
- ISR for the spurious interrupt handling is present.
- IDT and stack memory sizes are very limited.

regular (a "typical" image that has support for some kernel capabilities)
-------
- As for "minimal" configuration, except as noted below.
- Supports larger IDT and utilizes larger stacks.
- A statically linked dummy ISR is present.
- Background task also starts a fiber.
- Fiber prints a message to the console via printk().
- Supports system timer, along with NANO_TIMER objects.
- Links in support for NANO_SEM objects.

maximal (a "complex" image that has support for many kernel capabilities)
-------
- As for "regular" configuration, except as noted below.
- Supports full IDT and utilizes even larger stacks.
- Background task dynamically links in the dummy ISR, rather than having
  it statically linked.
- Fiber prints a message to the console via printf(), rather than printk().
- Links in support for NANO_LIFO, NANO_STACK, and NANO_FIFO objects.
- Adds floating point support (for x87 FPU, including SSE).


NOTE:
- These configurations utilize standard security only.

--------------------------------------------------------------------------------

Building and Running Project:

This nanokernel project does not generate any output in the default case
(TEST=min). In the regular case (TEST=reg) and the maximal case (TEST=max),
it outputs to the console. It can be built and executed on QEMU as follows:

    make pristine
    make TEST=min nanokernel.qemu         (minimal configuration)

    make pristine
    make TEST=reg nanokernel.qemu         (regular configuration)

    make pristine
    make TEST=max nanokernel.qemu         (maximal configuration)

--------------------------------------------------------------------------------

Sample output:

The resulting image is bootable for all configurations, but produces different
output in each case.

minimal
-------
This configuration does NOT produce any output. To observe its operation,
invoke it using gdb and observe that:
- main() increments "i" each time it loops
- the kernel's timer ISR increments "nanoTicks" on a regular basis

regular
-------
This configuration prints the following message to the console:

  Running regular nanokernel configuration

maximal
-------
This configuration prints the following message to the console:

  Running maximal nanokernel configuration

--------------------------------------------------------------------------------

Additional notes:

Various host utilities (such as the Unix "size" utility) can be used to
determine the footprint of the resulting outdir/nanokernel.elf image.