diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-09-19 14:23:54 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-10-09 17:06:49 -0500 |
commit | fb1836fd7b1b8839815595db08ae740ec7b86347 (patch) | |
tree | 54ff93536489c27b80af1f503520bd9894cdcfd3 /src/usr/errl/errlmanager.C | |
parent | 84e4274fe412a577f67805cc701f4fb66a3feb2f (diff) | |
download | talos-hostboot-fb1836fd7b1b8839815595db08ae740ec7b86347.tar.gz talos-hostboot-fb1836fd7b1b8839815595db08ae740ec7b86347.zip |
Support code coverage in extended modules.
- Reduce optimization (to -Os) to fit when doing coverage profile.
- Remove errl storage area from base image.
- Add GCC function attributes to sys library functions.
RTC: 36933
Change-Id: Ic83011a2444ef5b735db0446a14a0af34187eebf
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1908
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Melissa J. Connell <missyc@us.ibm.com>
Reviewed-by: Paul Nguyen <nguyenp@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/errlmanager.C')
-rw-r--r-- | src/usr/errl/errlmanager.C | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index bc4e84c0b..132ec49c1 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -48,7 +48,7 @@ extern trace_desc_t* g_trac_errl; // Scaffolding // Store error logs in this memory buffer in L3 RAM. -char g_ErrlStorage[ ERRL_STORAGE_SIZE ]; +char* g_ErrlStorage = new char[ ERRL_STORAGE_SIZE ]; /** @@ -90,23 +90,19 @@ ErrlManager::ErrlManager() // This buffer has a header (storage_header_t) followed by // storage. iv_pStorage = reinterpret_cast<storage_header_t*>(g_ErrlStorage); - - // g_ErrlStorage is in BSS segment, therefore already zeroed. - // memset( iv_pStorage, 0, sizeof(storage_header_t)); + memset( iv_pStorage, 0, sizeof(storage_header_t)); // Storage size is placed here for benefit of downstream parsers. - iv_pStorage->cbStorage = sizeof( g_ErrlStorage ); + iv_pStorage->cbStorage = ERRL_STORAGE_SIZE; // Offsets are zero-based at &g_ErrlStorage[0], // so the first usable offset is just past the header. iv_pStorage->offsetMarker = sizeof(storage_header_t); iv_pStorage->offsetStart = sizeof(storage_header_t); - // g_ErrlStorage is in BSS segment, therefore already zeroed. - // Thus, the prime marker in storage is already zero. - // marker_t* l_pMarker = OFFSET2MARKER( iv_pStorage->offsetStart ); - // l_pMarker->offsetNext = 0; - // l_pMarker->length = 0; + marker_t* l_pMarker = OFFSET2MARKER( iv_pStorage->offsetStart ); + l_pMarker->offsetNext = 0; + l_pMarker->length = 0; } |