RTEMS 6.1-rc1
Data Structures | Macros | Functions
capture.c File Reference

RTEMS Performance Monitoring and Measurement Framework. More...

#include <stdlib.h>
#include <string.h>
#include <rtems/captureimpl.h>
#include "capture_buffer.h"

Data Structures

struct  rtems_capture_per_cpu_data
 
struct  rtems_capture_global_data
 

Macros

#define RTEMS_CAPTURE_RECORD_EVENTS   (0)
 
#define capture_per_cpu_get(_cpu)    ( &capture_per_cpu[ _cpu ] )
 
#define capture_records_on_cpu(_cpu)   capture_per_cpu[ _cpu ].records
 
#define capture_count_on_cpu(_cpu)   capture_per_cpu[ _cpu ].count
 
#define capture_flags_on_cpu(_cpu)   capture_per_cpu[ _cpu ].flags
 
#define capture_reader_on_cpu(_cpu)   capture_per_cpu[ _cpu ].reader
 
#define capture_lock_on_cpu(_cpu)   capture_per_cpu[ _cpu ].lock
 
#define capture_flags_global   capture_global.flags
 
#define capture_controls   capture_global.controls
 
#define capture_extension_index   capture_global.extension_index
 
#define capture_timestamp   capture_global.timestamp
 
#define capture_ceiling   capture_global.ceiling
 
#define capture_floor   capture_global.floor
 
#define capture_lock_global   capture_global.lock
 

Functions

void rtems_capture_set_extension_index (int index)
 Capture set extension index. More...
 
int rtems_capture_get_extension_index (void)
 Capture get extension index. More...
 
uint32_t rtems_capture_get_flags (void)
 Capture get flags. More...
 
void rtems_capture_set_flags (uint32_t mask)
 Capture set flags. More...
 
void rtems_capture_get_time (rtems_capture_time *time)
 Capture returns the current time. More...
 
void rtems_capture_record_lock (rtems_capture_record_lock_context *context)
 Capture record lock. More...
 
void rtems_capture_record_unlock (rtems_capture_record_lock_context *context)
 Capture record unlock. More...
 
void * rtems_capture_record_open (rtems_tcb *tcb, uint32_t events, size_t size, rtems_capture_record_lock_context *context)
 Capture record open. More...
 
void rtems_capture_record_close (rtems_capture_record_lock_context *context)
 Capture record close. More...
 
void rtems_capture_initialize_task (rtems_tcb *tcb)
 Capture initialize task. More...
 
void rtems_capture_record_task (rtems_tcb *tcb)
 Capture record task. More...
 
bool rtems_capture_filter (rtems_tcb *tcb, uint32_t events)
 Capture filter. More...
 
bool rtems_capture_trigger_fired (rtems_tcb *ft, rtems_tcb *tt, uint32_t events)
 Capture check trigger. More...
 
rtems_status_code rtems_capture_open (uint32_t size, rtems_capture_timestamp timestamp RTEMS_UNUSED)
 Capture open. More...
 
rtems_status_code rtems_capture_close (void)
 Capture close. More...
 
rtems_status_code rtems_capture_set_control (bool enable)
 Capture control trace enable/disable. More...
 
rtems_status_code rtems_capture_set_monitor (bool enable)
 Capture monitor enable/disable. More...
 
rtems_status_code rtems_capture_flush (bool prime)
 
rtems_status_code rtems_capture_watch_add (rtems_name name, rtems_id id)
 Capture add watch. More...
 
rtems_status_code rtems_capture_watch_del (rtems_name name, rtems_id id)
 Capture delete watch. More...
 
rtems_status_code rtems_capture_watch_ctrl (rtems_name name, rtems_id id, bool enable)
 Capture enable/disable watch. More...
 
rtems_status_code rtems_capture_watch_global (bool enable)
 Capture enable/disable global watch. More...
 
bool rtems_capture_watch_global_on (void)
 Get global watch state. More...
 
rtems_status_code rtems_capture_watch_ceiling (rtems_task_priority ceiling)
 Set watch ceiling. More...
 
rtems_task_priority rtems_capture_watch_get_ceiling (void)
 Get watch ceiling. More...
 
rtems_status_code rtems_capture_watch_floor (rtems_task_priority floor)
 Capture set watch floor. More...
 
rtems_task_priority rtems_capture_watch_get_floor (void)
 Capture set watch floor. More...
 
rtems_status_code rtems_capture_set_trigger (rtems_name from_name, rtems_id from_id, rtems_name to_name, rtems_id to_id, rtems_capture_trigger_mode mode, rtems_capture_trigger trigger)
 Capture set trigger. More...
 
rtems_status_code rtems_capture_clear_trigger (rtems_name from_name, rtems_id from_id, rtems_name to_name, rtems_id to_id, rtems_capture_trigger_mode mode, rtems_capture_trigger trigger)
 Capture clear trigger. More...
 
rtems_status_code rtems_capture_read (uint32_t cpu, size_t *read, const void **recs)
 Capture read records from capture buffer. More...
 
rtems_status_code rtems_capture_release (uint32_t cpu, uint32_t count)
 Capture release records. More...
 
const char * rtems_capture_event_text (int event)
 Capture get event text. More...
 
rtems_capture_controlrtems_capture_get_control_list (void)
 Capture get control list. More...
 

Detailed Description

RTEMS Performance Monitoring and Measurement Framework.

This is the Capture Engine component.

Function Documentation

◆ rtems_capture_get_extension_index()

int rtems_capture_get_extension_index ( void  )

Capture get extension index.

This function rturns the extension index for the capture engine.

Return values
Thismethod returns the extension index.

◆ rtems_capture_get_flags()

uint32_t rtems_capture_get_flags ( void  )

Capture get flags.

This function gets the current flag settings for the capture engine.

Return values
Thismethod returns the global capture flags.

◆ rtems_capture_set_extension_index()

void rtems_capture_set_extension_index ( int  index)

Capture set extension index.

This function is used to set the extension index for the capture engine.

Parameters
[in]indexspecifies the extension index to be used for capture engine data.

◆ rtems_capture_set_flags()

void rtems_capture_set_flags ( uint32_t  mask)

Capture set flags.

This function sets a flag in the capture engine

Parameters
[in]maskspecifies the flag to set

◆ rtems_capture_trigger_fired()

bool rtems_capture_trigger_fired ( rtems_tcb ft,
rtems_tcb tt,
uint32_t  events 
)

Capture check trigger.

This function checks if we have triggered or if this event is a cause of a trigger.

Parameters
[in]ftspecifies specifices the capture from task
[in]ttspecifies specifices the capture to task
[in]eventsspecifies the events
Return values
Thismethod returns true if we have triggered or if the event is a cause of a trigger.