From 21bf38a46707358b60de5b6922df9c5101bee1d5 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 19 Jan 2021 10:11:42 -0500 Subject: [PATCH] Fix #945, Finish CFE_PLATFORM_ES_PERF_MAX_IDS removal --- cmake/sample_defs/cpu1_platform_cfg.h | 13 ------------- cmake/sample_defs/sample_perfids.h | 2 +- fsw/cfe-core/src/inc/cfe_es_events.h | 16 ++++------------ fsw/cfe-core/unit-test/es_UT.c | 4 ++-- 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/cmake/sample_defs/cpu1_platform_cfg.h b/cmake/sample_defs/cpu1_platform_cfg.h index fa5f9ced7..c9f6b938e 100644 --- a/cmake/sample_defs/cpu1_platform_cfg.h +++ b/cmake/sample_defs/cpu1_platform_cfg.h @@ -1034,19 +1034,6 @@ */ #define CFE_PLATFORM_ES_DEFAULT_PR_SYSLOG_MODE 1 -/** -** \cfeescfg Define Max Number of Performance IDs -** -** \par Description: -** Defines the maximum number of perf ids allowed. -** -** -** \par Limits -** This number must always be divisible by 32. There is a lower limit of 32 and -** an upper limit of 512 on this configuration paramater. -*/ -#define CFE_PLATFORM_ES_PERF_MAX_IDS 128 - /** ** \cfeescfg Define Max Size of Performance Data Buffer ** diff --git a/cmake/sample_defs/sample_perfids.h b/cmake/sample_defs/sample_perfids.h index 34b05a182..f721b55a1 100644 --- a/cmake/sample_defs/sample_perfids.h +++ b/cmake/sample_defs/sample_perfids.h @@ -26,7 +26,7 @@ ** Design Notes: ** Each performance id is used to identify something that needs to be ** measured. Performance ids are limited to the range of 0 to -** CFE_PLATFORM_ES_PERF_MAX_IDS - 1. Any performance ids outside of this range +** CFE_MISSION_ES_PERF_MAX_IDS - 1. Any performance ids outside of this range ** will be ignored and will be flagged as an error. Note that ** performance ids 0-31 are reserved for the cFE Core. ** diff --git a/fsw/cfe-core/src/inc/cfe_es_events.h b/fsw/cfe-core/src/inc/cfe_es_events.h index 06acbc1fd..29cbe4312 100644 --- a/fsw/cfe-core/src/inc/cfe_es_events.h +++ b/fsw/cfe-core/src/inc/cfe_es_events.h @@ -996,12 +996,8 @@ **/ #define CFE_ES_PERF_FILTMSKCMD_EID 63 -/** \brief 'Error:Performance Filter Mask Index value -** greater than CFE_ES_PERF_32BIT_WORDS_IN_MASK (which is a whole number derived from -** CFE_PLATFORM_ES_PERF_MAX_IDS / 32)' -** \event 'Error:Performance Filter Mask Index value -** greater than CFE_ES_PERF_32BIT_WORDS_IN_MASK (which is a whole number derived from -** CFE_PLATFORM_ES_PERF_MAX_IDS / 32)' +/** \brief 'Performance Filter Mask Cmd Error,Index(%u)out of range(%u)' +** \event 'Performance Filter Mask Cmd Error,Index(%u)out of range(%u)' ** ** \par Type: ERROR ** @@ -1027,12 +1023,8 @@ **/ #define CFE_ES_PERF_TRIGMSKCMD_EID 65 -/** \brief 'Error: Performance Trigger Mask Index value -** greater than CFE_ES_PERF_32BIT_WORDS_IN_MASK (which is a whole number derived from -** CFE_PLATFORM_ES_PERF_MAX_IDS / 32)' -** \event 'Error: Performance Trigger Mask Index value -** greater than CFE_ES_PERF_32BIT_WORDS_IN_MASK (which is a whole number derived from -** CFE_PLATFORM_ES_PERF_MAX_IDS / 32)' +/** \brief 'Performance Trigger Mask Cmd Error,Index(%u)out of range(%u)' +** \event 'Performance Trigger Mask Cmd Error,Index(%u)out of range(%u)' ** ** \par Type: ERROR ** diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index bff84dc8b..fb66424e5 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -4188,7 +4188,7 @@ void TestPerf(void) Perf->MetaData.TriggerCount = CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE +1; Perf->MetaData.InvalidMarkerReported = false; Perf->MetaData.DataEnd = CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE +1 ; - CFE_ES_PerfLogAdd(CFE_PLATFORM_ES_PERF_MAX_IDS, 0); + CFE_ES_PerfLogAdd(CFE_MISSION_ES_PERF_MAX_IDS, 0); UT_Report(__FILE__, __LINE__, Perf->MetaData.InvalidMarkerReported == true, "CFE_ES_PerfLogAdd", @@ -4242,7 +4242,7 @@ void TestPerf(void) ES_ResetUnitTest(); Perf->MetaData.State = CFE_ES_PERF_TRIGGERED; Perf->MetaData.InvalidMarkerReported = 2; - CFE_ES_PerfLogAdd(CFE_PLATFORM_ES_PERF_MAX_IDS + 1, 0); + CFE_ES_PerfLogAdd(CFE_MISSION_ES_PERF_MAX_IDS + 1, 0); UT_Report(__FILE__, __LINE__, Perf->MetaData.InvalidMarkerReported == 2, "CFE_ES_PerfLogAdd",