diff options
author | Chris Phan <cphan@us.ibm.com> | 2014-07-22 16:08:30 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-08-13 16:06:43 -0500 |
commit | 33b10855c501a5fb450fa5c7d377377576e1188a (patch) | |
tree | bd3b6966c8afba5d460ed25882f02458218f1e2d /src/usr/diag/prdf/common | |
parent | 15cde95b1c44bdfd603957d13e851001fa0da78c (diff) | |
download | talos-hostboot-33b10855c501a5fb450fa5c7d377377576e1188a.tar.gz talos-hostboot-33b10855c501a5fb450fa5c7d377377576e1188a.zip |
PRD: Move Trace Array Data outside of Register Capture Section
Change-Id: I071ede7a3666c162cfe7893b1a08acb61076e1df
RTC: 112428
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12391
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12726
Diffstat (limited to 'src/usr/diag/prdf/common')
6 files changed, 66 insertions, 20 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/iipSystem.C b/src/usr/diag/prdf/common/framework/config/iipSystem.C index 1e79437d3..ab083751a 100755 --- a/src/usr/diag/prdf/common/framework/config/iipSystem.C +++ b/src/usr/diag/prdf/common/framework/config/iipSystem.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1996,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -386,6 +388,10 @@ int32_t System::Analyze(STEP_CODE_DATA_STRUCT & serviceData, l_temp_sdc->GetCaptureData().mergeData( serviceData.service_data->GetCaptureData()); + // merge trace array data from the two analysis + l_temp_sdc->getTraceArrayData().mergeData( + serviceData.service_data->getTraceArrayData()); + *serviceData.service_data = *l_temp_sdc; delete l_temp_sdc; diff --git a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C index 72e2fc17f..cf5442f7c 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C +++ b/src/usr/diag/prdf/common/framework/register/prdfCaptureData.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2003,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -369,18 +371,20 @@ void CaptureData::mergeData(CaptureData & i_cd) { DataContainerType l_data = *(i_cd.getData()); - // Remove duplicate entries from secondary capture data - for (ConstDataIterator i = data.begin(); i != data.end(); i++) + if( !l_data.empty() ) { - l_data.remove_if( - prdfCompareCaptureDataEntry(i->chipHandle, - i->address) ); - } + // Remove duplicate entries from secondary capture data + for (ConstDataIterator i = data.begin(); i != data.end(); i++) + { + l_data.remove_if(prdfCompareCaptureDataEntry(i->chipHandle, + i->address) ); + } - // Add secondary capture data to primary one - data.insert( data.end(), - l_data.begin(), - l_data.end() ); + // Add secondary capture data to primary one + data.insert( data.end(), + l_data.begin(), + l_data.end() ); + } } diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h index 5399292a3..6eecfadb9 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h @@ -213,6 +213,13 @@ public: */ CaptureData & GetCaptureData() {return(captureData);} + /** + * @brief Get access to the traceArrayData object + * + * @Return TraceArray Data + */ + CaptureData & getTraceArrayData() {return iv_traceArrayData;} + /** Add a mru to the Callout list <ul> @@ -771,6 +778,12 @@ private: // Data ErrorSignature error_signature; CaptureData captureData; + + // This is used to hold L2/L3/NX trace array data. + // We need to separate this out from above scom + // reg captureData in case system runs out of errl + // storage space and truncates our logs. + CaptureData iv_traceArrayData; SDC_MRU_LIST xMruList; // dg07 PRDF_SIGNATURES iv_SignatureList; // jl00 uint32_t maskId; diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl index de7159404..4732ec63c 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1998,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -31,6 +33,7 @@ ServiceDataCollector::ServiceDataCollector() : #endif error_signature(), captureData(), + iv_traceArrayData(), xMruList(), maskId(0), attentionType(INVALID_ATTENTION_TYPE), diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C index 52c08e448..598ffd80d 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C @@ -569,6 +569,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, if (calloutsPlusDimms > 3) { AddCapData(sdc.GetCaptureData(),iv_errl); + AddCapData(sdc.getTraceArrayData(), iv_errl); capDataAdded = true; } @@ -764,7 +765,8 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, // Check to make sure Capture Data wasn't added earlier. if (!capDataAdded) { - AddCapData(sdc.GetCaptureData() ,iv_errl); + AddCapData(sdc.GetCaptureData(), iv_errl); + AddCapData(sdc.getTraceArrayData(), iv_errl); } // Note moved the code from here, that was associated with checking for the last @@ -985,8 +987,10 @@ void ErrDataService::AddCapData( CaptureData & i_cd, errlHndl_t i_errHdl) (size_t) l_compressBufSize, ErrlVer2, ErrlCapData_1 ); delete [] l_compressCapBuf; - delete l_CapDataBuf; + }while (0); + + delete l_CapDataBuf; } //------------------------------------------------------------------------------ diff --git a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C index e4df55d53..f4a66616d 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C +++ b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2004,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -283,10 +285,21 @@ uint32_t ServiceDataCollector::Flatten(uint8_t * i_buffer, uint32_t & io_size) c buffer_append(current_ptr,(uint32_t)causeAttentionType); // Add as much capture data as we have room. + uint32_t cap_size = 0; uint8_t * cap_size_ptr = current_ptr; // Place for Capture data size - current_ptr += sizeof(uint32_t); + current_ptr += sizeof(cap_size); - uint32_t cap_size = captureData.Copy(current_ptr,max_size - (current_ptr - i_buffer)); + cap_size = captureData.Copy( + current_ptr,max_size - (current_ptr - i_buffer)); + current_ptr += cap_size; + buffer_append(cap_size_ptr,cap_size); + + // Add as much TraceArray capture data as we have room. + cap_size_ptr = current_ptr; // Place for Capture data size + current_ptr += sizeof(cap_size); + + cap_size = iv_traceArrayData.Copy( + current_ptr,max_size - (current_ptr - i_buffer)); current_ptr += cap_size; buffer_append(cap_size_ptr,cap_size); @@ -355,11 +368,14 @@ ServiceDataCollector & ServiceDataCollector::operator=( causeAttentionType = (ATTENTION_TYPE) buffer_get32(i_flatdata); // Capture data - oh joy - // do we re-expand the data or change capture date to hang onto the already flattened data? + // do we re-expand the data or change capture date + // to hang onto the already flattened data? // lets give it back to the capture data object and let it decide. - captureData = i_flatdata; + // CaptureData::operator= will take care of unflattening the data + iv_traceArrayData = i_flatdata; + return *this; } |