Commit Graph

6 Commits

Author SHA1 Message Date
Sebastian Huber
f9219db2a9 rtems: Add rtems_scheduler_get_processor_maximum()
Add rtems_scheduler_get_processor_maximum() as a replacement for
rtems_get_processor_count(). The rtems_get_processor_count() is a bit
orphaned. Adopt it by the Scheduler Manager. The count is also
misleading, since the processor set may have gaps and the actual count
of online processors may be less than the value returned by
rtems_get_processor_count().

Update #3732.
2019-04-09 08:06:46 +02:00
Sebastian Huber
01a5ced5e6 record: Add more system events
Update #3665.
2019-03-12 13:59:15 +01:00
Sebastian Huber
ebb8c28ee9 record: Add system call entry/exit events
This corresponds to the Linux syscall_entry_* and syscall_exit_* events.

Update #3665.
2019-03-12 13:59:11 +01:00
Sebastian Huber
d91951fbc0 record: Rename internal per-CPU events
Update #3665.
2019-03-12 13:44:24 +01:00
Sebastian Huber
03cdd5eab8 record: Add enum value for each event
Update #3665.
2019-01-30 09:46:35 +01:00
Sebastian Huber
dca618404e Add low level event recording support
Add low level event recording infrastructure for system and user
defined events.  The infrastructure is able to record high frequency
events such as

 * SMP lock acquire/release,
 * interrupt entry/exit,
 * thread switches,
 * UMA zone allocate/free, and
 * Ethernet packet input/output, etc.

It allows post-mortem analysis in fatal error handlers, e.g. the last
events are in the record buffer, the newest event overwrites the oldest
event.  It is possible to detect record buffer overflows for consumers
that expect a continuous stream of events, e.g. to display the system
state in real-time.

The implementation supports high-end SMP machines (more than 1GHz
processor frequency, more than four processors).

Add a new API instead. The implementation uses per-processor data
structures and no atomic read-modify-write operations.  It is uses
per-processor ring buffers to record the events.

The CPU counter is used to get the time of events. It is combined with
periodic uptime events to synchronize it with CLOCK_REALTIME.

The existing capture engine tries to solve this problem also, but its
performance is not good enough for high-end production systems.  The
main issues are the variable-size buffers and the use of SMP locks for
synchronization.  To fix this, the API would change significantly.

Update #3665.
2019-01-29 13:51:33 +01:00