RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Files | Functions
CPU Usage Reporting

The CPU usage reporting directives can be used to report and reset the CPU usage of threads. More...

Files

file  cpuuse.h
 This header file provides the CPU usage reporting API.
 

Functions

int rtems_cpu_info_report (const struct rtems_printer *printer)
 Reports the CPU information using the printer plugin.
 
void rtems_cpu_usage_report (void)
 Reports the CPU usage of each thread using the printk() printer.
 
void rtems_cpu_usage_report_with_plugin (const struct rtems_printer *printer)
 Reports the CPU usage of each thread using the printer plugin.
 
void rtems_cpu_usage_reset (void)
 Resets the CPU usage of each thread.
 
void rtems_cpu_usage_top (void)
 Starts an interactive CPU usage reporting using the printk() printer.
 
void rtems_cpu_usage_top_with_plugin (const struct rtems_printer *printer)
 Starts an interactive CPU usage reporting using the printer plugin.
 

Detailed Description

The CPU usage reporting directives can be used to report and reset the CPU usage of threads.

Function Documentation

◆ rtems_cpu_info_report()

int rtems_cpu_info_report ( const struct rtems_printer printer)

Reports the CPU information using the printer plugin.

Parameters
printeris the printer plugin to output the report.
Returns
Returns the number of characters printed.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.
  • The directive will not cause the calling task to be preempted.

◆ rtems_cpu_usage_report()

void rtems_cpu_usage_report ( void  )

Reports the CPU usage of each thread using the printk() printer.

Notes
See also rtems_cpu_usage_report_with_plugin().
Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.
  • The directive may be called from within task context.
  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.

◆ rtems_cpu_usage_report_with_plugin()

void rtems_cpu_usage_report_with_plugin ( const struct rtems_printer printer)

Reports the CPU usage of each thread using the printer plugin.

Parameters
printeris the printer plugin to output the report.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.
  • The directive may be called from within task context.
  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.

◆ rtems_cpu_usage_reset()

void rtems_cpu_usage_reset ( void  )

Resets the CPU usage of each thread.

Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.
  • The directive may be called from within task context.
  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.

◆ rtems_cpu_usage_top()

void rtems_cpu_usage_top ( void  )

Starts an interactive CPU usage reporting using the printk() printer.

Notes
See also rtems_cpu_usage_top_with_plugin().
Constraints

The following constraints apply to this directive:

  • The directive may be called from within task context.
  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
  • The directive sends a request to another task and waits for a response. This may cause the calling task to be blocked and unblocked.

◆ rtems_cpu_usage_top_with_plugin()

void rtems_cpu_usage_top_with_plugin ( const struct rtems_printer printer)

Starts an interactive CPU usage reporting using the printer plugin.

Parameters
printeris the printer plugin to output the report.
Notes
The directive starts a task to do the reporting. The getchar() function is used to get commands from the user.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within task context.
  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.
  • The directive sends a request to another task and waits for a response. This may cause the calling task to be blocked and unblocked.