RTEMS CPU Kit with SuperCore
4.11.3
|
Capture Implementation file. More...
#include "capture.h"
Go to the source code of this file.
#define | RTEMS_CAPTURE_INIT (1u << 0) |
#define | RTEMS_CAPTURE_ON (1U << 1) |
#define | RTEMS_CAPTURE_NO_MEMORY (1U << 2) |
#define | RTEMS_CAPTURE_TRIGGERED (1U << 3) |
#define | RTEMS_CAPTURE_GLOBAL_WATCH (1U << 4) |
#define | RTEMS_CAPTURE_ONLY_MONITOR (1U << 5) |
#define | RTEMS_CAPTURE_OVERFLOW (1U << 0) |
#define | RTEMS_CAPTURE_READER_ACTIVE (1U << 1) |
#define | RTEMS_CAPTURE_READER_WAITING (1U << 2) |
#define | rtems_capture_begin_add_record(_task, _events, _size, _rec) |
Capture begin add record. More... | |
#define | rtems_capture_end_add_record(_rec) |
Capture end add record. More... | |
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... | |
rtems_status_code | rtems_capture_user_extension_open (void) |
Capture user extension open. More... | |
rtems_status_code | rtems_capture_user_extension_close (void) |
Capture user extension close. More... | |
bool | rtems_capture_trigger (rtems_tcb *ft, rtems_tcb *tt, uint32_t events) |
Capture trigger. More... | |
bool | rtems_capture_filter (rtems_tcb *task, uint32_t events) |
Capture filter. More... | |
void | rtems_capture_get_time (rtems_capture_time_t *time) |
Capture returns the current time. More... | |
void * | rtems_capture_record_open (rtems_tcb *task, uint32_t events, size_t size, rtems_interrupt_lock_context *lock_context) |
Capture record open. More... | |
void | rtems_capture_record_close (void *rec, rtems_interrupt_lock_context *lock_context) |
Capture record close. More... | |
void | rtems_capture_print_trace_records (int total, bool csv) |
Capture print trace records. More... | |
void | rtems_capture_print_timestamp (uint64_t uptime) |
Capture print timestamp. More... | |
void | rtems_capture_print_record_task (uint32_t cpu, rtems_capture_record_t *rec) |
Capture print record task. More... | |
void | rtems_capture_print_record_capture (uint32_t cpu, rtems_capture_record_t *rec, uint64_t diff) |
Capture print capture record. More... | |
void | rtems_capture_print_watch_list (void) |
Capture print watch list. More... | |
Capture Implementation file.
This file contains an interface between the capture engine and capture user extension methods.
#define rtems_capture_begin_add_record | ( | _task, | |
_events, | |||
_size, | |||
_rec | |||
) |
Capture begin add record.
This function opens a record for writing and inserts the header information
[in] | _task | specifies the capture task block |
[in] | _events | specifies the events |
[in] | _size | specifies the expected size of the capture record |
[out] | _rec | specifies the next write point in the capture record |
#define rtems_capture_end_add_record | ( | _rec | ) |
Capture end add record.
This function completes the add capture record process
[in] | _rec | specifies the end of the capture record |
bool rtems_capture_filter | ( | rtems_tcb * | task, |
uint32_t | events | ||
) |
Capture filter.
This function this function specifies if the given task and events should be logged.
[in] | task | specifies the capture task control block |
[in] | events | specifies the events |
This | method returns true if this data should be filtered from the log. It returns false if this data should be logged. |
int rtems_capture_get_extension_index | ( | void | ) |
Capture get extension index.
This function rturns the extension index for the capture engine.
This | method returns the extension index. |
uint32_t rtems_capture_get_flags | ( | void | ) |
Capture get flags.
This function gets the current flag settings for the capture engine.
This | method returns the global capture flags. |
void rtems_capture_get_time | ( | rtems_capture_time_t * | time | ) |
Capture returns the current time.
This function returns the current time. If a handler is provided by the user the time is gotten from that.
[in] | time | specifies the capture time |
This | method returns a nano-second time if no user handler is provided. Otherwise, it returns a resolution defined by the handler. |
void rtems_capture_print_record_capture | ( | uint32_t | cpu, |
rtems_capture_record_t * | rec, | ||
uint64_t | diff | ||
) |
Capture print capture record.
This function prints a user extension capture record.
[in] | cpu | specifies the cpu the cpu the record was logged on. |
[in] | rec | specifies the record. |
[in] | diff | specifies the time between this and the last capture record. |
void rtems_capture_print_record_task | ( | uint32_t | cpu, |
rtems_capture_record_t * | rec | ||
) |
Capture print record task.
This function prints a capture record task. This record contains information to identify a task. It is refrenced in other records by the task id.
[in] | cpu | specifies the cpu the cpu the record was logged on. |
[in] | rec | specifies the task record. |
References rtems_capture_print_timestamp().
Referenced by rtems_capture_print_timestamp().
void rtems_capture_print_timestamp | ( | uint64_t | uptime | ) |
Capture print timestamp.
This function prints uptime in a timestamp format.
[in] | uptime | specifies the timestamp to print |
References rtems_capture_print_record_task().
Referenced by rtems_capture_print_record_task().
void rtems_capture_print_trace_records | ( | int | total, |
bool | csv | ||
) |
Capture print trace records.
This function reads, prints and releases up to total trace records in either a csv format or an ascii table format.
[in] | total | specifies the number of records to print |
[in] | csv | specifies a comma seperated value format |
References read(), rtems_capture_read(), rtems_get_processor_count(), rtems_status_text(), and RTEMS_SUCCESSFUL.
void rtems_capture_print_watch_list | ( | void | ) |
Capture print watch list.
This function prints a capture watch list
References rtems_capture_get_control_list(), rtems_capture_watch_get_ceiling(), rtems_capture_watch_get_floor(), and rtems_capture_watch_global_on().
void rtems_capture_record_close | ( | void * | rec, |
rtems_interrupt_lock_context * | lock_context | ||
) |
Capture record close.
This function closes writing to capure record and releases the lock that was held on the record. This method should only be used by rtems_capture_end_add_record.
[in] | rec | specifies the record |
[out] | lock_context | specifies the lock context |
References rtems_interrupt_lock_release.
void* rtems_capture_record_open | ( | rtems_tcb * | task, |
uint32_t | events, | ||
size_t | size, | ||
rtems_interrupt_lock_context * | lock_context | ||
) |
Capture record open.
This function allocates a record and fills in the header information. It does a lock acquire which will remain in effect until rtems_capture_record_close is called. This method should only be used by rtems_capture_begin_add_record.
[in] | task | specifies the caputre task block |
[in] | events | specifies the events |
[in] | size | specifies capture record size |
[out] | lock_context | specifies the lock context |
This | method returns a pointer to the next location in the capture record to store data. |
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.
[in] | index | specifies the extension index to be used for capture engine data. |
void rtems_capture_set_flags | ( | uint32_t | mask | ) |
Capture set flags.
This function sets a flag in the capture engine
[in] | mask | specifies the flag to set |
Capture trigger.
This function checks if we have triggered or if this event is a cause of a trigger.
[in] | ft | specifies specifices the capture from task |
[in] | tt | specifies specifices the capture to task |
[in] | events | specifies the events |
This | method returns true if we have triggered or if the event is a cause of a trigger. |
rtems_status_code rtems_capture_user_extension_close | ( | void | ) |
Capture user extension close.
This function closes the capture user extensions.
This | method returns RTEMS_SUCCESSFUL upon a successful delete of the user extensions. |
References rtems_extension_delete().
rtems_status_code rtems_capture_user_extension_open | ( | void | ) |
Capture user extension open.
This function creates the capture user extensions.
This | method returns RTEMS_SUCCESSFUL upon successful creation of the user extensions. |