Skip to content

Commit

Permalink
Merge pull request #1104 from skliper/fix945-platform_perf_max_id
Browse files Browse the repository at this point in the history
Fix #945, Finish CFE_PLATFORM_ES_PERF_MAX_IDS removal
  • Loading branch information
astrogeco authored Jan 25, 2021
2 parents 5b1d054 + 21bf38a commit cc514bc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 28 deletions.
13 changes: 0 additions & 13 deletions cmake/sample_defs/cpu1_platform_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1019,19 +1019,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
**
Expand Down
2 changes: 1 addition & 1 deletion cmake/sample_defs/sample_perfids.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**
Expand Down
16 changes: 4 additions & 12 deletions fsw/cfe-core/src/inc/cfe_es_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,12 +996,8 @@
**/
#define CFE_ES_PERF_FILTMSKCMD_EID 63

/** \brief <tt> '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)' </tt>
** \event <tt> '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)' </tt>
/** \brief <tt> 'Performance Filter Mask Cmd Error,Index(%u)out of range(%u)' </tt>
** \event <tt> 'Performance Filter Mask Cmd Error,Index(%u)out of range(%u)' </tt>
**
** \par Type: ERROR
**
Expand All @@ -1027,12 +1023,8 @@
**/
#define CFE_ES_PERF_TRIGMSKCMD_EID 65

/** \brief <tt> '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)' </tt>
** \event <tt> '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)' </tt>
/** \brief <tt> 'Performance Trigger Mask Cmd Error,Index(%u)out of range(%u)' </tt>
** \event <tt> 'Performance Trigger Mask Cmd Error,Index(%u)out of range(%u)' </tt>
**
** \par Type: ERROR
**
Expand Down
4 changes: 2 additions & 2 deletions fsw/cfe-core/unit-test/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -4164,7 +4164,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",
Expand Down Expand Up @@ -4218,7 +4218,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",
Expand Down

0 comments on commit cc514bc

Please sign in to comment.