genode/os
Josef Söntgen bdec3dd668 os: initial version of trace_fs
The trace_fs server provides access to a Trace_session by using a
File_system_session as frontend.

Each trace subject is represented by a directory ('thread_name.subject')
that contains specific files ('active', 'cleanup', 'enable', 'events',
'buffer_size' and 'policy'), which are used to control the tracing
process of the thread as well as storing the content of its trace
buffer.

The tracing of a thread is only activated if there is a valid policy
installed and the intend to trace the subject was made clear by writing
'1' to the 'enable' file.

The tracing of a thread may be deactived by writing a '0' to the
'enable' file.

A policy may be changed by overwriting the currently used one. In this
case the old policy is replaced by the new policy and is automatically
utilize.

Writing a value to the 'buffer_size' file changes the appointed size of
the trace buffer. This value is only evaluted by reactivating the
tracing process.

The content of the trace buffer may be accessed by reading from the
'events' file. Throughout all tracing session new trace events are
appended to this file.

Nodes of UNTRACED subjects are kept as long as they do not change their
tracing state to DEAD. In this case all nodes are removed from the
file system. Subjects that were traced before and are now UNTRACED will
only be removed by writing '1' to the 'cleanup' file - even if they
are DEAD by now.

To use the trace_fs a config similar to the following may be used:

! <start name="trace_fs">
! 	<resource name="RAM" quantum="128M"/>
! 	<provides><service name="File_system"/></provides>
! 	<config>
! 		<policy label="noux -> trace" interval="1000" subject_limit="512" trace_quota="64M" />
! 	</config>
! </start>

'interval' sets the periode in which the Trace_session is polled. The
time is given in milliseconds.
'subject_limit' speficies how many trace subject should by acquired at
most when the Trace_session is polled.
'trace_quota' is the amount of quota the trace_fs should use for the
Trace_session connection. The remaing amount of RAM quota will be used
for the actual nodes of the file system and the 'policy' as well as the
'events' files.
In addiition there are 'buffer_size' and 'buffer_size_limit' that define
the initial and the upper limit of the size of a trace buffer.
Tracing of parent processes or rather threads may be enabled by setting
'parent_levels' to a value greater than '0' (though this attribute is
available, the trace session component within core still lacks support
for it).

A ready-to-use runscript can by found in 'ports/run/noux_trace_fs.run'.

Fixes #1049.
2014-02-25 14:58:02 +01:00
..
doc CPU affinity configuration fixes 2013-09-02 19:43:36 +02:00
include block: prevent from dereferencing invalid pointers 2014-02-25 14:58:02 +01:00
lib/mk hw: basic support for ODROID XU board (Fix #991) 2013-12-03 11:30:07 +01:00
run block: cache between one client and one device 2014-02-25 14:58:02 +01:00
src os: initial version of trace_fs 2014-02-25 14:58:02 +01:00
tool Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
README Imported Genode release 11.11 2011-12-22 16:19:25 +01:00

This is the example operating system based on the Genode OS framework:

:_Init_: is the first real process in the system. The provided implementation
  uses a very simple XML parser to read its configuration files.

:_Drivers_: The example OS has basic drivers for frame buffer, mouse and
  keyboard input, the PCI bus, the real-time clock, and system-specific timers.

:_Server_: The only server in the example OS is Nitpicker, a
  minimal-complexity GUI server.

:_Test_: are also part of the example OS. You may have a look at the fork
  bomb as a simple system stress test.

:_Ldso_: is the dynamic linker used for loading executables that are linked
  against shared libraries.

:_Lib_: contains libraries used by the components of the OS repository,
  in particular the device-driver kit, the alarm framework, and support
  for dynamic linking.