diff options
author | Sakethan R Kotta <sakkotta@in.ibm.com> | 2018-03-29 07:10:59 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-06-19 17:24:01 -0400 |
commit | 1ec6201b896c5cbc22fef03df1a063faa8cd6411 (patch) | |
tree | 4eec7df976c14204aef99de916e2ff0612aca161 /src/usr/trace/runtime/rt_service.C | |
parent | 34d086e3e67827f0496b838d5d05a9964aa1346c (diff) | |
download | talos-hostboot-1ec6201b896c5cbc22fef03df1a063faa8cd6411.tar.gz talos-hostboot-1ec6201b896c5cbc22fef03df1a063faa8cd6411.zip |
HBRT Reserved Mem Trace Buffer implementation.
-Hostboot master Drawer will create TRACEBUF section in the HB
Rsvd Mem and HBRT, while booting, gets the TRACEBUF section
details and initializes the circual buffer, if available.
-If a valid data is present in the buffer, HBRT will create an
info log ERRL, otherwise initializes the buffer.
-Traces from all components are serialized and stored in the
single TRACEBUF in the same format (fsp-binary Trace). When
buffer is full, it deletes the oldest entry/entries to store
the new ones.
-ERRL->collectTrace() works similar to other buffers.
-A new test case is added to dump the traces from TRACEBUF.
Change-Id: I4ce943231a2ba30e3a13ca34d1c40ff68464a994
RTC:188726
RTC:191302
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56450
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/trace/runtime/rt_service.C')
-rw-r--r-- | src/usr/trace/runtime/rt_service.C | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/usr/trace/runtime/rt_service.C b/src/usr/trace/runtime/rt_service.C index 476e6052d..d3dbde773 100644 --- a/src/usr/trace/runtime/rt_service.C +++ b/src/usr/trace/runtime/rt_service.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,6 +38,7 @@ #include <util/align.H> #include <runtime/interface.h> #include <util/singleton.H> +#include "rt_rsvdtracebufservice.H" namespace TRACE { @@ -52,6 +53,9 @@ namespace TRACE iv_buffers[BUFFER_SLOW] = nullptr; iv_buffers[BUFFER_FAST] = new Buffer(iv_daemon); + // Force create the Reserved Trace Buffer Service object + iv_rsvdtracebufservice = &(Singleton<RsvdTraceBufService>::instance()); + iv_compList = &(Singleton<ComponentList>::instance()); } @@ -240,6 +244,11 @@ namespace TRACE // "Commit" entry to buffer. l_buffer->commitEntry(l_entry); + // Copy the trace entry in to the Reserved Trace Buffer too + iv_rsvdtracebufservice->writeEntry(i_td, + reinterpret_cast<char*>(&l_entry->data[0]), + l_realSize); + } while(0); } @@ -384,6 +393,11 @@ namespace TRACE // "Commit" entry to buffer. l_buffer->commitEntry(l_entry); + // Copy the trace entry in to the Reserved Trace Buffer too + iv_rsvdtracebufservice->writeEntry(i_td, + reinterpret_cast<char*>(&l_entry->data[0]), + l_realSize); + } while(0); } |