RTEMS 6.3
Loading...
Searching...
No Matches
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)
#define capture_records_on_cpu(_cpu)
#define capture_count_on_cpu(_cpu)
#define capture_flags_on_cpu(_cpu)
#define capture_reader_on_cpu(_cpu)
#define capture_lock_on_cpu(_cpu)
#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.
int rtems_capture_get_extension_index (void)
 Capture get extension index.
uint32_t rtems_capture_get_flags (void)
 Capture get flags.
void rtems_capture_set_flags (uint32_t mask)
 Capture set flags.
void rtems_capture_get_time (rtems_capture_time *time)
 Capture returns the current time.
void rtems_capture_record_lock (rtems_capture_record_lock_context *context)
 Capture record lock.
void rtems_capture_record_unlock (rtems_capture_record_lock_context *context)
 Capture record unlock.
void * rtems_capture_record_open (rtems_tcb *tcb, uint32_t events, size_t size, rtems_capture_record_lock_context *context)
 Capture record open.
void rtems_capture_record_close (rtems_capture_record_lock_context *context)
 Capture record close.
void rtems_capture_initialize_task (rtems_tcb *tcb)
 Capture initialize task.
void rtems_capture_record_task (rtems_tcb *tcb)
 Capture record task.
bool rtems_capture_filter (rtems_tcb *tcb, uint32_t events)
 Capture filter.
bool rtems_capture_trigger_fired (rtems_tcb *ft, rtems_tcb *tt, uint32_t events)
 Capture check trigger.
rtems_status_code rtems_capture_open (uint32_t size, rtems_capture_timestamp timestamp RTEMS_UNUSED)
 Capture open.
rtems_status_code rtems_capture_close (void)
 Capture close.
rtems_status_code rtems_capture_set_control (bool enable)
 Capture control trace enable/disable.
rtems_status_code rtems_capture_set_monitor (bool enable)
 Capture monitor enable/disable.
rtems_status_code rtems_capture_flush (bool prime)
rtems_status_code rtems_capture_watch_add (rtems_name name, rtems_id id)
 Capture add watch.
rtems_status_code rtems_capture_watch_del (rtems_name name, rtems_id id)
 Capture delete watch.
rtems_status_code rtems_capture_watch_ctrl (rtems_name name, rtems_id id, bool enable)
 Capture enable/disable watch.
rtems_status_code rtems_capture_watch_global (bool enable)
 Capture enable/disable global watch.
bool rtems_capture_watch_global_on (void)
 Get global watch state.
rtems_status_code rtems_capture_watch_ceiling (rtems_task_priority ceiling)
 Set watch ceiling.
rtems_task_priority rtems_capture_watch_get_ceiling (void)
 Get watch ceiling.
rtems_status_code rtems_capture_watch_floor (rtems_task_priority floor)
 Capture set watch floor.
rtems_task_priority rtems_capture_watch_get_floor (void)
 Capture set watch floor.
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.
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.
rtems_status_code rtems_capture_read (uint32_t cpu, size_t *read, const void **recs)
 Capture read records from capture buffer.
rtems_status_code rtems_capture_release (uint32_t cpu, uint32_t count)
 Capture release records.
const char * rtems_capture_event_text (int event)
 Capture get event text.
rtems_capture_control * rtems_capture_get_control_list (void)
 Capture get control list.

Detailed Description

RTEMS Performance Monitoring and Measurement Framework.

This is the Capture Engine component.

Macro Definition Documentation

◆ capture_count_on_cpu

#define capture_count_on_cpu ( _cpu)
Value:
capture_per_cpu[ _cpu ].count

◆ capture_flags_on_cpu

#define capture_flags_on_cpu ( _cpu)
Value:
capture_per_cpu[ _cpu ].flags

◆ capture_lock_on_cpu

#define capture_lock_on_cpu ( _cpu)
Value:
capture_per_cpu[ _cpu ].lock

◆ capture_per_cpu_get

#define capture_per_cpu_get ( _cpu)
Value:
( &capture_per_cpu[ _cpu ] )

◆ capture_reader_on_cpu

#define capture_reader_on_cpu ( _cpu)
Value:
capture_per_cpu[ _cpu ].reader

◆ capture_records_on_cpu

#define capture_records_on_cpu ( _cpu)
Value:
capture_per_cpu[ _cpu ].records

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.