summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/errlentry.C
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-03-12 15:28:10 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-16 09:53:10 -0500
commitf1760e04ceab564f8cef0c8d267bece75cce116c (patch)
tree285afb6fa850a01e1fe584313f7908f9fb9e701d /src/usr/errl/errlentry.C
parent8a1168142bd3f273dbd4edf841c53a3ae394cd5e (diff)
downloadtalos-hostboot-f1760e04ceab564f8cef0c8d267bece75cce116c.tar.gz
talos-hostboot-f1760e04ceab564f8cef0c8d267bece75cce116c.zip
ERRL: Interface to remove backtrace from error log
RTC: 37794 Change-Id: I944f6ed9c86c64e0d3a84649d1f71e66a9aaa7c3 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/732 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/errlentry.C')
-rw-r--r--src/usr/errl/errlentry.C25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index ad83ce3df..b71c45f7b 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -61,7 +61,7 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev,
iv_termState(TERM_STATE_UNKNOWN)
{
// Collect the Backtrace and add it to the error log
- ErrlUserDetailsBackTrace().addToLog(this);
+ iv_pBackTrace = new ErrlUserDetailsBackTrace();
}
///////////////////////////////////////////////////////////////////////////////
@@ -75,6 +75,8 @@ ErrlEntry::~ErrlEntry()
delete (*l_itr);
}
+ delete iv_pBackTrace;
+ iv_pBackTrace = NULL;
}
///////////////////////////////////////////////////////////////////////////////
@@ -133,9 +135,9 @@ void ErrlEntry::appendToFFDC(ErrlUD * i_pErrlUD,
///////////////////////////////////////////////////////////////////////////////
// Return a Boolean indication of success.
-// Use these to tag the UD section containing the trace.
-const int FIPS_ERRL_UDT_TRACE = 0x0c;
-const int FIPS_ERRL_UDV_DEFAULT_VER_1 = 1;
+// Use these to tag the UD section containing the trace.
+const int FIPS_ERRL_UDT_TRACE = 0x0c;
+const int FIPS_ERRL_UDV_DEFAULT_VER_1 = 1;
bool ErrlEntry::collectTrace(const char i_name[], const uint64_t i_max)
{
@@ -209,6 +211,13 @@ bool ErrlEntry::collectTrace(const char i_name[], const uint64_t i_max)
return l_rc;
}
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+void ErrlEntry::removeBackTrace()
+{
+ delete iv_pBackTrace;
+ iv_pBackTrace = NULL;
+}
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
@@ -272,6 +281,14 @@ void ErrlEntry::commit( compId_t i_committerComponent )
// User header contains the component ID of the committer.
iv_User.setComponentId( i_committerComponent );
+
+ // Add the captured backtrace to the error log
+ if (iv_pBackTrace)
+ {
+ iv_pBackTrace->addToLog(this);
+ delete iv_pBackTrace;
+ iv_pBackTrace = NULL;
+ }
}
OpenPOWER on IntegriCloud