1 /* 2 * Trace Recorder for Tracealyzer v4.5.1 3 * Copyright 2021 Percepio AB 4 * www.percepio.com 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 * 8 * Configuration parameters for the trace recorder library in streaming mode. 9 * Read more at http://percepio.com/2016/10/05/rtos-tracing/ 10 */ 11 12 #ifndef TRC_STREAMING_CONFIG_H 13 #define TRC_STREAMING_CONFIG_H 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 /******************************************************************************* 20 * Configuration Macro: TRC_CFG_SYMBOL_TABLE_SLOTS 21 * 22 * The maximum number of symbols names that can be stored. This includes: 23 * - Task names 24 * - Named ISRs (vTraceSetISRProperties) 25 * - Named kernel objects (vTraceStoreKernelObjectName) 26 * - User event channels (xTraceRegisterString) 27 * 28 * If this value is too small, not all symbol names will be stored and the 29 * trace display will be affected. In that case, there will be warnings 30 * (as User Events) from TzCtrl task, that monitors this. 31 ******************************************************************************/ 32 #define TRC_CFG_SYMBOL_TABLE_SLOTS CONFIG_PERCEPIO_RECORDER_TRC_CFG_SYMBOL_TABLE_SLOTS 33 34 /******************************************************************************* 35 * Configuration Macro: TRC_CFG_SYMBOL_MAX_LENGTH 36 * 37 * The maximum length of symbol names, including: 38 * - Task names 39 * - Named ISRs (vTraceSetISRProperties) 40 * - Named kernel objects (vTraceStoreKernelObjectName) 41 * - User event channel names (xTraceRegisterString) 42 * 43 * If longer symbol names are used, they will be truncated by the recorder, 44 * which will affect the trace display. In that case, there will be warnings 45 * (as User Events) from TzCtrl task, that monitors this. 46 ******************************************************************************/ 47 #define TRC_CFG_SYMBOL_MAX_LENGTH CONFIG_PERCEPIO_RECORDER_TRC_CFG_SYMBOL_MAX_LENGTH 48 49 /******************************************************************************* 50 * Configuration Macro: TRC_CFG_OBJECT_DATA_SLOTS 51 * 52 * The maximum number of object data entries (used for task priorities) that can 53 * be stored at the same time. Must be sufficient for all tasks, otherwise there 54 * will be warnings (as User Events) from TzCtrl task, that monitors this. 55 ******************************************************************************/ 56 #define TRC_CFG_OBJECT_DATA_SLOTS CONFIG_PERCEPIO_RECORDER_TRC_CFG_OBJECT_DATA_SLOTS 57 58 /******************************************************************************* 59 * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT 60 * 61 * Specifies the number of pages used by the paged event buffer. 62 * This may need to be increased if there are a lot of missed events. 63 * 64 * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead) 65 ******************************************************************************/ 66 #ifdef CONFIG_PERCEPIO_RECORDER_TRC_STREAM_PORT_USE_INTERNAL_BUFFER 67 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT CONFIG_PERCEPIO_RECORDER_TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT 68 #else 69 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_COUNT 10 70 #endif 71 72 /******************************************************************************* 73 * Configuration Macro: TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE 74 * 75 * Specifies the size of each page in the paged event buffer. This can be tuned 76 * to match any internal low-level buffers used by the streaming interface, like 77 * the Ethernet MTU (Maximum Transmission Unit). However, since the currently 78 * active page can't be transfered, having more but smaller pages is more 79 * efficient with respect memory usage, than having a few large pages. 80 * 81 * Note: not used by the J-Link RTT stream port (see trcStreamingPort.h instead) 82 ******************************************************************************/ 83 #ifdef CONFIG_PERCEPIO_RECORDER_TRC_STREAM_PORT_USE_INTERNAL_BUFFER 84 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE CONFIG_PERCEPIO_RECORDER_TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE 85 #else 86 #define TRC_CFG_PAGED_EVENT_BUFFER_PAGE_SIZE 500 87 #endif 88 89 /******************************************************************************* 90 * TRC_CFG_ISR_TAILCHAINING_THRESHOLD 91 * 92 * Macro which should be defined as an integer value. 93 * 94 * If tracing multiple ISRs, this setting allows for accurate display of the 95 * context-switching also in cases when the ISRs execute in direct sequence. 96 * 97 * vTraceStoreISREnd normally assumes that the ISR returns to the previous 98 * context, i.e., a task or a preempted ISR. But if another traced ISR 99 * executes in direct sequence, Tracealyzer may incorrectly display a minimal 100 * fragment of the previous context in between the ISRs. 101 * 102 * By using TRC_CFG_ISR_TAILCHAINING_THRESHOLD you can avoid this. This is 103 * however a threshold value that must be measured for your specific setup. 104 * See http://percepio.com/2014/03/21/isr_tailchaining_threshold/ 105 * 106 * The default setting is 0, meaning "disabled" and that you may get an 107 * extra fragments of the previous context in between tail-chained ISRs. 108 * 109 * Note: This setting has separate definitions in trcSnapshotConfig.h and 110 * trcStreamingConfig.h, since it is affected by the recorder mode. 111 ******************************************************************************/ 112 #define TRC_CFG_ISR_TAILCHAINING_THRESHOLD CONFIG_PERCEPIO_RECORDER_TRC_CFG_ISR_TAILCHAINING_THRESHOLD_STREAMING 113 114 #ifdef __cplusplus 115 } 116 #endif 117 118 #endif /* TRC_STREAMING_CONFIG_H */ 119