diff options
author | Matt Raybuck <mraybuc@us.ibm.com> | 2018-08-16 15:56:18 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-08-28 13:42:51 -0500 |
commit | 6a593d78b7c559ab77ab315b0534b253df2f3ace (patch) | |
tree | b31e0da193d50fc806a062f686f9ff7d5a855bf4 /src/include/usr | |
parent | cc012e3efd4cf8b66b65e6c3e6731cdec870da18 (diff) | |
download | talos-hostboot-6a593d78b7c559ab77ab315b0534b253df2f3ace.tar.gz talos-hostboot-6a593d78b7c559ab77ab315b0534b253df2f3ace.zip |
Combine trace buffers in errlog
Whenever ErrlEntry::collectTrace() was called it would
create a new trace UD section each time. This led to
duplicate entries in the errl. A new function was added
to ErrlEntry to prune duplicates called
removeDuplicateTraces().
Change-Id: I3685ecf1368dad421bca2d1b6b612e08755e25ce
RTC: 118128
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64971
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/errl/errlentry.H | 47 | ||||
-rw-r--r-- | src/include/usr/errl/errlreasoncodes.H | 1 |
2 files changed, 37 insertions, 11 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 2d36218ae..6ac856237 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -487,6 +487,27 @@ public: const uint64_t i_max = KILOBYTE); /** + * @brief Remove the duplicate trace entries from user detail data + * When multiple calls to collectTrace() on the same component id occur a + * new user detail section is created each time. This function removes the + * duplicates created from that process. + * + * @algorithm A high level overview of what the code does is as follows: + * * Iterate through the iv_SectionVector which contains all UD + * sections and add each trace_bin_entry_t to a vector corresponding + * to each component id found in iv_SectionVector. + * * For each vector in the map of component id vectors + * * sort the collection of traces by timestamp and hash + * * call unique where the same timestamp and hash are considered + * to be equivalent trace entries to be removed. + * * Put all remaining trace entries into a new, consolidated trace + * UD section. + * * Remove the old trace UD sections from iv_SectionVector + * * Add the new consolidated trace UD sections to the iv_SectionVector + */ + void removeDuplicateTraces(void); + + /** * @brief Remove the back trace user detail data * When an error log is constructed, the back trace is automatically * captured. This function removes the backtrace. This should be used when @@ -896,6 +917,8 @@ private: ErrlEntry(const ErrlEntry& i_right); ErrlEntry& operator=(const ErrlEntry& i_right); + + private: // Data Members ErrlPrvt iv_Private; // private header object @@ -909,20 +932,22 @@ private: // hostboot. errlTermState_t iv_termState; - // when true, the severity has been set "final" and can not be changed. - bool iv_sevFinal; + // when true, the severity has been set "final" and can not be changed. + bool iv_sevFinal; + + //when true, the current error log will not be saved to PNOR, sent to the + //BMC, or displayed in the console + bool iv_skipShowingLog; + + // when true, send this special type of eSEL to the BMC + // This is used to send OCC informational errors up to BMC + bool iv_eselCallhomeInfoEvent; - //when true, the current error log will not be saved to PNOR, sent to the - //BMC, or displayed in the console - bool iv_skipShowingLog; + // when true, if error log is committed, then the error log is tracked so + // doShutdown can request that a HB dump be done. + bool iv_doHbDump; - // when true, send this special type of eSEL to the BMC - // This is used to send OCC informational errors up to BMC - bool iv_eselCallhomeInfoEvent; - // when true, if error log is committed, then the error log is tracked so - // doShutdown can request that a HB dump be done. - bool iv_doHbDump; }; diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H index c77e1de2a..56f9b7f87 100644 --- a/src/include/usr/errl/errlreasoncodes.H +++ b/src/include/usr/errl/errlreasoncodes.H @@ -58,6 +58,7 @@ namespace ERRORLOG ERRL_TEST_LOGREGISTER_UD = ERRL_COMP_ID | 0x05, ERRL_TEST_CALLOUT_UD = ERRL_COMP_ID | 0x06, ERRL_CORE_EX_TARGET_NULL = ERRL_COMP_ID | 0x07, + ERRL_TEST_DUPLICATE_TRACE = ERRL_COMP_ID | 0x08, //........ ERRL_LAST_ERR = ERRL_COMP_ID | 0xFF }; |