diff options
author | prem <premjha2@in.ibm.com> | 2012-12-20 06:47:02 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-02-15 07:18:04 -0600 |
commit | f4942a357eb311c99afa2a96da949b17030a2f07 (patch) | |
tree | 6197089653b18958a4895c59c4371a87c95d2383 /src/usr/diag/prdf/common/framework/resolution | |
parent | e3aa31e88b5074f67b9b145c224ef9613afee1e9 (diff) | |
download | talos-hostboot-f4942a357eb311c99afa2a96da949b17030a2f07.tar.gz talos-hostboot-f4942a357eb311c99afa2a96da949b17030a2f07.zip |
Design Change for PRD Resolution
Change-Id: I4d3ed18d78a8f829029354d85550b5b5f311a155
RTC: 47516
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2765
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3198
Diffstat (limited to 'src/usr/diag/prdf/common/framework/resolution')
17 files changed, 436 insertions, 450 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h index 11f86cba0..15df041a7 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipCalloutResolution.h @@ -49,10 +49,7 @@ //-------------------------------------------------------------------- #include <prdfCallouts.H> - -#if !defined(iipResolution_h) #include <iipResolution.h> -#endif namespace PRDF { @@ -81,7 +78,7 @@ public: <br><b>Exceptions: </b> None. </ul><br> */ - CalloutResolution(PRDF::PRDcallout callout, PRDF::PRDpriority priority); + CalloutResolution(PRDcallout callout, PRDpriority priority); CalloutResolution(void); // default CalloutResolution(const CalloutResolution & cr); @@ -131,15 +128,15 @@ public: private: // functions private: // Data - PRDF::PRDcallout xMruCallout; - PRDF::PRDpriority xPriority; + PRDcallout xMruCallout; + PRDpriority xPriority; }; inline -CalloutResolution::CalloutResolution(PRDF::PRDcallout callout, - PRDF::PRDpriority priority) +CalloutResolution::CalloutResolution(PRDcallout callout, + PRDpriority priority) : xMruCallout(callout), xPriority(priority) {} diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C index 165b979ab..a9d65aa62 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C @@ -53,7 +53,6 @@ #include <prdfCalloutConnected.H> #include <prdfAnalyzeConnected.H> #include <prdfPlatServices.H> - #undef iipResolution_C namespace PRDF @@ -88,12 +87,12 @@ Resolution::~Resolution() {} // EregResolution Member Function Specifications //--------------------------------------------------------------------- -int32_t EregResolution::Resolve(STEP_CODE_DATA_STRUCT & data) +int32_t EregResolution::Resolve( STEP_CODE_DATA_STRUCT & io_data ) { int32_t rc = PRD_INTERNAL_CODE_ERROR; - if(errorRegister != NULL) + if( errorRegister != NULL ) { - rc = errorRegister->Analyze(data); + rc = errorRegister->Analyze( io_data ); } return rc; } @@ -104,9 +103,32 @@ int32_t EregResolution::Resolve(STEP_CODE_DATA_STRUCT & data) // using MruValues (xspiiCallout.h) //--------------------------------------------------------------------- -int32_t CalloutResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t CalloutResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { - error.service_data->SetCallout(xMruCallout,xPriority); + /* + This resolution is only needed when we callout self.So during RuleChip + creation,we create CalloutResolution passing NULL as target value.In Resolve + function when we need to update SDC with target to be called out we get it + from Service Data Collector.It is because target currently under analysis is + the target that needs to be called out here.By instantiating Callout + resolution with just priority info and NULL target , we are able to reduce + CalloutResolution objects to one per priority instead of one per target per + priority.So,this reduction in number of resolution objects shall eventually + reduce memory utilization. + */ + + if( PRDcallout::TYPE_TARGET == xMruCallout.getType( ) ) + { + PRDcallout l_targetCallout( + ServiceDataCollector::getTargetAnalyzed( ) ); + + io_serviceData.service_data->SetCallout( l_targetCallout ,xPriority ); + } + else + { + io_serviceData.service_data->SetCallout( xMruCallout,xPriority ); + } + return(SUCCESS); } @@ -114,7 +136,7 @@ int32_t CalloutResolution::Resolve(STEP_CODE_DATA_STRUCT & error) // ResolutionList Member Functions //-------------------------------------------------------------------- -int32_t ResolutionList::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t ResolutionList::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { int32_t rc = SUCCESS; for(std::vector<void *>::iterator iter = resolutionList.begin(); @@ -122,8 +144,8 @@ int32_t ResolutionList::Resolve(STEP_CODE_DATA_STRUCT & error) ++iter) { Resolution * r = (Resolution *) *iter; - rc = r->Resolve(error); - if(rc != SUCCESS) break; + rc = r->Resolve( io_serviceData ); + if( rc != SUCCESS ) break; } return(rc); } @@ -149,16 +171,17 @@ int32_t ResolutionList::Resolve(STEP_CODE_DATA_STRUCT & error) //-------------------------------------------------------------------- // Call all chips raising attention as reported by sp sysdebug area //-------------------------------------------------------------------- -int32_t CallAttnResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t CallAttnResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { int32_t rc = NO_DOMAINS_AT_ATTENTION; SYSTEM_DEBUG_CLASS systemDebug; - ErrorSignature * signature = error.service_data->GetErrorSignature(); + ErrorSignature * signature = + io_serviceData.service_data->GetErrorSignature(); signature->clear(); signature->setChipId(0xffffffff); - systemDebug.CalloutThoseAtAttention(error); + systemDebug.CalloutThoseAtAttention( io_serviceData ); signature->setErrCode((uint16_t)NO_PRD_ANALYSIS); @@ -167,60 +190,64 @@ int32_t CallAttnResolution::Resolve(STEP_CODE_DATA_STRUCT & error) // ******************************************************************** -int32_t TerminateResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t TerminateResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { - error.service_data->SetTerminate(); + io_serviceData.service_data->SetTerminate(); return(SUCCESS); } // ******************************************************************** -int32_t AnalyzeChipResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t AnalyzeChipResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { // mk442956 a - return xChip.Analyze(error,error.service_data->GetCauseAttentionType()); + return xChip.Analyze( io_serviceData, + io_serviceData.service_data->GetCauseAttentionType() ); } // ******************************************************************** -int32_t TryResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t TryResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { // Save the current error signature - ErrorSignature * es = error.service_data->GetErrorSignature(); + ErrorSignature * es = io_serviceData.service_data->GetErrorSignature(); ErrorSignature temp = *es; // Try the tryResolution - int32_t rc = xTryResolution->Resolve(error); + int32_t rc = xTryResolution->Resolve( io_serviceData ); if ( (SUCCESS != rc) && (PRD_NO_CLEAR_FIR_BITS != rc) ) // if it didn't work { // Restore signature *es = temp; // Call the default signature - rc = xDefaultResolution->Resolve(error); + rc = xDefaultResolution->Resolve( io_serviceData ); } return rc; } -int32_t CalloutConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) +int32_t CalloutConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { using namespace TARGETING; TargetHandle_t l_pconnectedTarget = NULL; + TARGETING::TargetHandle_t l_psourceTarget = + ServiceDataCollector::getTargetAnalyzed( ) ; TargetHandleList l_connectedTargetList; - l_connectedTargetList = PlatServices::getConnected( iv_psourceHandle, + l_connectedTargetList = PlatServices::getConnected( l_psourceTarget, iv_targetType ); - if(0xffffffff == iv_idx) + if( 0xffffffff == iv_idx ) { - if(l_connectedTargetList.size()>0) + if( l_connectedTargetList.size()>0 ) { l_pconnectedTarget = l_connectedTargetList[0]; } } else { - for(TargetHandleList::iterator itrTarget = l_connectedTargetList.begin(); - itrTarget!= l_connectedTargetList.end();itrTarget++) + for( TargetHandleList::iterator itrTarget = + l_connectedTargetList.begin(); + itrTarget!= l_connectedTargetList.end();itrTarget++ ) { - if(iv_idx == PlatServices::getTargetPosition(*itrTarget)) + if( iv_idx == PlatServices::getTargetPosition( *itrTarget ) ) { l_pconnectedTarget = *itrTarget ; break; @@ -230,17 +257,18 @@ int32_t CalloutConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) if ( l_pconnectedTarget != NULL ) { - serviceData.service_data->SetCallout(l_pconnectedTarget,iv_priority); + io_serviceData.service_data->SetCallout( l_pconnectedTarget, + iv_priority ); } else { if(iv_altResolution != NULL) { - iv_altResolution->Resolve(serviceData); + iv_altResolution->Resolve( io_serviceData ); } else { - serviceData.service_data->SetCallout(iv_psourceHandle); + io_serviceData.service_data->SetCallout( l_psourceTarget ); } } @@ -250,22 +278,23 @@ int32_t CalloutConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) //-------------------------------------------------------------------- // AnalyzeConnected Member Functions //-------------------------------------------------------------------- -int32_t AnalyzeConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) +int32_t AnalyzeConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { using namespace TARGETING; CHIP_CLASS * l_connChipObj = NULL; TARGETING::TargetHandle_t l_pconnChipTarget = NULL; - + TARGETING::TargetHandle_t l_psourceHandle = + ServiceDataCollector::getTargetAnalyzed( ) ; // Get connected list. TargetHandleList l_connectedTargetList = PlatServices::getConnected( - iv_psourceHandle, + l_psourceHandle, iv_targetType ); // If ID = 0xffffffff, find first valid. - if (0xffffffff == iv_idx) + if ( 0xffffffff == iv_idx ) { - if(l_connectedTargetList.size()>0) + if( l_connectedTargetList.size()>0 ) { //First valid handle. we don't allow invalid things in list l_pconnChipTarget = l_connectedTargetList[0] ; @@ -274,10 +303,11 @@ int32_t AnalyzeConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) // Otherwise, grab from correct index. else { - for(TargetHandleList::iterator itrTarget = l_connectedTargetList.begin(); - itrTarget!= l_connectedTargetList.end();itrTarget++) + for( TargetHandleList::iterator itrTarget = + l_connectedTargetList.begin(); + itrTarget!= l_connectedTargetList.end();itrTarget++ ) { - if(iv_idx == PlatServices::getTargetPosition(*itrTarget)) + if( iv_idx == PlatServices::getTargetPosition( *itrTarget ) ) { l_pconnChipTarget = *itrTarget ; break; @@ -287,15 +317,15 @@ int32_t AnalyzeConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) } // If valid chip found, look up in global system container. - if (NULL != l_pconnChipTarget) + if ( NULL != l_pconnChipTarget ) { - l_connChipObj = systemPtr->GetChip(l_pconnChipTarget); + l_connChipObj = systemPtr->GetChip( l_pconnChipTarget ); } // Analyze chip. if (NULL != l_connChipObj) - return l_connChipObj->Analyze( serviceData, - serviceData.service_data->GetCauseAttentionType() ); + return l_connChipObj->Analyze( io_serviceData, + io_serviceData.service_data->GetCauseAttentionType() ); else return PRD_UNRESOLVED_CHIP_CONNECTION; } diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipResolution.h index 899d90c65..2c5edf729 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.h @@ -54,13 +54,8 @@ // Includes //-------------------------------------------------------------------- -#if !defined(PRDF_TYPES_H) #include <prdf_types.h> -#endif - -#if !defined(IIPSTEP_H) #include <iipstep.h> -#endif namespace PRDF { @@ -87,12 +82,11 @@ public: virtual ~Resolution(); /** - Resolve the service data for this error syndrome - @pre None - @post service data is complete - @return SUCCESS | non-zero + * @brief Resolve the service data for this error syndrome + * @param[io] io_data Reference to STEP_CODE_DATA_STRUCT + * @return SUCCESS | non-zero */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data) = 0; + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data ) = 0; // Function Specification ******************************************** // // Purpose: Resolve service data for a specific error bit (Pure Virtual) diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C index 74deed70c..4ce761867 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C @@ -184,35 +184,32 @@ MaskResolution & ResolutionFactory::GetThresholdResolution(uint32_t maskId) } Resolution & ResolutionFactory::GetConnectedCalloutResolution( - TARGETING::TargetHandle_t i_psourceHandle, TARGETING::TYPE i_targetType, uint32_t i_idx, PRDpriority i_priority, Resolution * i_altResolution ) { - CalloutConnected key( i_psourceHandle, - i_targetType, - i_idx, - i_priority, - i_altResolution ); + CalloutConnected key( i_targetType, + i_idx, + i_priority, + i_altResolution ); return iv_connectedCallouts.get(key); } Resolution & ResolutionFactory::GetAnalyzeConnectedResolution( - TARGETING::TargetHandle_t i_psourceHandle, TARGETING::TYPE i_targetType, uint32_t i_idx ) { - AnalyzeConnected key( i_psourceHandle, i_targetType, i_idx ); + AnalyzeConnected key( i_targetType, i_idx ); return iv_analyzeConnected.get(key); } Resolution & ResolutionFactory::GetPluginCallResolution( - ExtensibleChip * i_chip, ExtensibleChipFunction * i_function) + ExtensibleChipFunction * i_function ) { - return iv_pluginCallFW.get(PluginCallResolution(i_chip,i_function)); + return iv_pluginCallFW.get( PluginCallResolution( i_function ) ); } Resolution & ResolutionFactory::GetThresholdSigResolution( @@ -221,35 +218,36 @@ Resolution & ResolutionFactory::GetThresholdSigResolution( return iv_thresholdSigFW.get(ThresholdSigResolution(policy)); } -Resolution & ResolutionFactory::GetEregResolution(ErrorRegisterType & er) +Resolution & ResolutionFactory::GetEregResolution(ErrorRegisterType & i_er) { - return iv_eregResolutionFW.get(EregResolution(er)); + return iv_eregResolutionFW.get(EregResolution(i_er)); } -Resolution & ResolutionFactory::GetTryResolution( Resolution & tryRes, - Resolution & defaultRes ) +Resolution & ResolutionFactory::GetTryResolution( Resolution & i_tryRes, + Resolution & i_defaultRes ) { - return iv_tryResolutionFW.get(TryResolution(tryRes,defaultRes)); + return iv_tryResolutionFW.get(TryResolution(i_tryRes,i_defaultRes)); } -Resolution & ResolutionFactory::GetFlagResolution(ServiceDataCollector::Flag flag) +Resolution & ResolutionFactory::GetFlagResolution( + ServiceDataCollector::Flag i_flag ) { - return iv_flagResolutionFW.get(FlagResolution(flag)); + return iv_flagResolutionFW.get( FlagResolution( i_flag ) ); } #ifdef __HOSTBOOT_MODULE Resolution & ResolutionFactory::GetDumpResolution( - /* FIXME: hwTableContent iDumpRequestContent, */ - TARGETING::TargetHandle_t i_pDumpHandle ) + /* FIXME: hwTableContent iDumpRequestContent, */ + ) { - return iv_dumpResolutionFW.get(DumpResolution(/*FIXME: iDumpRequestContent,*/ i_pDumpHandle)); + return iv_dumpResolutionFW.get( DumpResolution( + /*FIXME: iDumpRequestContent,*/ ) ); } #else Resolution & ResolutionFactory::GetDumpResolution( - hwTableContent iDumpRequestContent, - TARGETING::TargetHandle_t i_pDumpHandle ) + hwTableContent iDumpRequestContent ) { - return iv_dumpResolutionFW.get(DumpResolution(iDumpRequestContent, i_pDumpHandle)); + return iv_dumpResolutionFW.get(DumpResolution( iDumpRequestContent ) ); } #endif @@ -258,19 +256,17 @@ Resolution & ResolutionFactory::GetGardResolution(GardResolution::ErrorType et) return iv_gardResolutionFW.get(GardResolution(et)); } -Resolution & ResolutionFactory::GetCaptureResolution - (ExtensibleChip * i_chip, - uint32_t i_group) +Resolution & ResolutionFactory::GetCaptureResolution( int32_t i_group ) { - return iv_captureResolutionFW.get(CaptureResolution(i_chip,i_group)); + return iv_captureResolutionFW.get( CaptureResolution( i_group ) ); } Resolution & ResolutionFactory::GetClockResolution( TARGETING::TargetHandle_t i_pClockHandle, TARGETING::TYPE i_targetType ) { - return iv_clockResolutionFW.get( ClockResolution(i_pClockHandle, - i_targetType) ); + return iv_clockResolutionFW.get( ClockResolution( i_pClockHandle, + i_targetType ) ); } void ResolutionFactory::Reset() @@ -278,16 +274,56 @@ void ResolutionFactory::Reset() PRDF_INF( "ResolutionFactory.Reset()" ); iv_thresholdResolutions.clear(); - iv_Links.clear(); // we must clear this because it could have links to Thresholds + // we must clear this because it could have links to Thresholds + iv_Links.clear(); iv_pluginCallFW.clear(); iv_thresholdSigFW.clear(); iv_eregResolutionFW.clear(); iv_tryResolutionFW.clear(); - iv_captureResolutionFW.clear(); //dgxx - iv_connectedCallouts.clear(); // Clear because the "alt resolution" could have be a link or other cleared resolution. - iv_clockResolutionFW.clear(); //jl01a + iv_captureResolutionFW.clear(); + /*Clear because the "alt resolution" could have be a link or other cleared + resolution.*/ + iv_connectedCallouts.clear(); + iv_clockResolutionFW.clear(); } +#ifdef FLYWEIGHT_PROFILING + +void ResolutionFactory::printStats() +{ + PRDF_TRAC("Callout"); + iv_Callouts.printStats( ); + PRDF_TRAC("Link Resolution"); + iv_Links.printStats( ); + PRDF_TRAC("ThresholdResolutionList"); + iv_thresholdResolutions.printStats( ); + PRDF_TRAC("MaskResolution"); + iv_maskResolutions.printStats( ); + PRDF_TRAC("ConnectedCallout"); + iv_connectedCallouts.printStats( ); + PRDF_TRAC("AnalyzeConnectedCallout"); + iv_analyzeConnected.printStats( ); + PRDF_TRAC("pluginCallFW"); + iv_pluginCallFW.printStats( ); + PRDF_TRAC("Threshhold"); + iv_thresholdSigFW.printStats( ); + PRDF_TRAC("EregResolution"); + iv_eregResolutionFW.printStats( ); + PRDF_TRAC("TryResolution"); + iv_tryResolutionFW.printStats( ); + PRDF_TRAC("FlagResolution"); + iv_flagResolutionFW.printStats( ); + PRDF_TRAC("dumpResolution"); + iv_dumpResolutionFW.printStats( ); + PRDF_TRAC("gardResolution"); + iv_gardResolutionFW.printStats( ); + PRDF_TRAC("captureResolution"); + iv_captureResolutionFW.printStats( ); + PRDF_TRAC("clockResolution"); + iv_clockResolutionFW.printStats( ); + +} +#endif } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h index 1094c763b..b0d7becb9 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h @@ -50,23 +50,12 @@ // Includes //-------------------------------------------------------------------- -#if !defined(IIPCONST_H) #include <iipconst.h> -#endif - -#if !defined(PRDFFLYWEIGHT_H) // dg01 +#include <iipglobl.h> #include <prdfFlyWeight.H> // dg01 #include <prdfFlyWeightS.H> -#endif // dg01 - -#if !defined(iipCalloutResolution_h) #include <iipCalloutResolution.h> -#endif - -#if !defined(PRDFTHRESHOLDRESOLUTIONS_H) // dg02a #include <prdfThresholdResolutions.H> // dg02a -#endif // dg02a - #include <prdfCalloutConnected.H> // dg04a #include <prdfAnalyzeConnected.H> // dg05a #include <prdfPluginCallResolution.H> // dg06a @@ -95,190 +84,186 @@ class ResolutionFactory public: /** - Access the ResolutionFactory singleton - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> Resolution factory - <br><b>Requirements:</b> None. - <br><b>Promises: </b> Object created if it does not already exist - <br><b>Exceptions: </b> None. - </ul><br> + * @brief Accesses the ResolutionFactory singleton + * @return Resolution factory */ static ResolutionFactory & Access(void); /** - DTOR - <ul> - <br><b>Requirements:</b> None. - <br><b>Promises: </b> Resources released - <br><b>Exceptions: </b> None. - </ul><br> + * @brief Destructor */ ~ResolutionFactory(); // dg03a start /** - Reset after a re-ipl - Clear the resolution lists that need clearing on a re-ipl - @note currently clears the threshold resolution list and the link resolution list + * @brief Reset after a re-ipl + * Clear the resolution lists that need clearing on a re-ipl + * @note currently clears the threshold resolution list and the link + * resolution list */ void Reset(); // dg03a end /** - Get a resolution that makes a callout - <ul> - <br><b>Parameter: </b> PRDcallout (see prdfCallouts.H) - <br><b>Parameter: </b> PRDpriority (see prdfCallouts.H) - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> None. - <br><b>Promises: </b> If a resolution does not exist for this MruCallout - then one is created. - <br><b>Exceptions: </b> None. - <br><b>Note: </b> Regatta CSP use only - <br><b>Note: </b> Do not call this method from a static object - </ul><br> + * @brief Get a resolution that makes a callout + * @param [in] PRDcallout (see prdfCallouts.H) + * @param [in] PRDpriority (see prdfCallouts.H) + * @return Resolution & + * @note Regatta CSP use only. Do not call this method from a static + * object. */ Resolution & GetCalloutResolution( PRDcallout callout, PRDpriority p = PRDF::MRU_MED); /** - Get a threshold Resolution - @param Mask id to set when threshold is reached - @param policy (theshold value & time interval) during normal runtime (default is ???) - @param mfgPolicy for manufactoring mode (default is threshold one, infinate interval) - @return reference to a resolution - @pre None - @post appropriate Resolution created. - @note the iv_thresholdResoltion FlyWeight is cleared by this->Reset() + * @brief Get a threshold Resolution + * @param[in] maskId MaskId to set when threshold is reached + * @param[in] policy policy during normal runtime + * @param[in] mfgPolicy policy for manufactoring mode ( default is + * threshold one,infinate interval ) + * @return reference to a resolution + * @post appropriate Resolution created. + * @note the iv_thresholdResoltion FlyWeight is cleared by + * this->Reset() */ MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy& policy, - const ThresholdResolution::ThresholdPolicy& mfgPolicy); + const ThresholdResolution::ThresholdPolicy& policy, + const ThresholdResolution::ThresholdPolicy& mfgPolicy); MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy& policy); + const ThresholdResolution::ThresholdPolicy& policy); MaskResolution & GetThresholdResolution(uint32_t maskId); MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy* policy); + const ThresholdResolution::ThresholdPolicy* policy); // dg04a - start /** - GetConnectedCalloutResolution - @param i_psourceHandle handle of connection source - @param i_targetType Type of target connected to i_source - @param idx index in GetConnected list to use - @param i_priority @see prdfCallouts.H - @param i_altResolution to use if the connection does not exist, is not functional, or is invalid. - If NULL than the connection source is called-out - @note Don't use this to callout clocks - use prdfClockResolution + * @brief GetConnectedCalloutResolution + * @param[in] i_targetType Type of target connected to i_source + * @param[in] idx index in GetConnected list to use + * @param[in] i_priority @see prdfCallouts.H + * @param[in] i_altResolution resolution for failure scenarios + * @return reference to a resolution + * @note Don't use this to callout clocks - use prdfClockResolution */ - Resolution & GetConnectedCalloutResolution(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx = 0, - PRDpriority i_priority = MRU_MED, - Resolution * i_altResolution = NULL); + Resolution & GetConnectedCalloutResolution( + TARGETING::TYPE i_targetType, + uint32_t i_idx = 0, + PRDpriority i_priority = MRU_MED, + Resolution * i_altResolution = NULL ); // dg04a - end // dg05a - start /** - * GetAnalyzeConnectedResoltuion - * @param i_psourceHandle handle of connection source - * @param i_targetType type of desired unit that's connected to the source - * @param i_dx index in GetConnected list to analyze + * @brief GetAnalyzeConnectedResoltuion + * @param[in] i_targetType type of unit that's connected to the source + * @param[in] i_dx index in GetConnected list to analyze + * @return reference to a resolution */ - Resolution & GetAnalyzeConnectedResolution(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, + Resolution & GetAnalyzeConnectedResolution( TARGETING::TYPE i_targetType, uint32_t i_idx =0xffffffff ); // dg05a - end // dg06a - start /** - * Get a PluginCallResolution - * @param ptr to ExtensibleChip - * @param ptr to ExtensibleFunction - * @post one instance with these params will exist - * @This flyweight is cleared by this->Reset() + * @brief Returns object of PluginCallResolution + * @param[in] i_function pointer to ExtensibleFunction + * @return reference to a resolution + * @post one instance with these params will exist + * @note This flyweight is cleared by this->Reset() */ - Resolution & GetPluginCallResolution(ExtensibleChip * i_chip, - ExtensibleChipFunction * i_function); + Resolution & GetPluginCallResolution( ExtensibleChipFunction * i_function ); /** - * Get a threshold signature resolution - * @param policy (either enum or uint32_t) - * @post one instance with this policy will exist - * @this flyweight is cleared by this->Reset() + * @brief Get a threshold signature resolution + * @param[in] i_policy Reference to ThresholdPolicy struct + * @return reference to a resolution + * @post one instance with this policy will exist + * @note This flyweight is cleared by this->Reset() */ - Resolution & GetThresholdSigResolution(const ThresholdResolution::ThresholdPolicy& policy); + Resolution & GetThresholdSigResolution( const ThresholdResolution:: + ThresholdPolicy& i_policy ); /** - * Get an EregResolution - * @param Error register - * @post one instance with the param will exist - * @note the error register provided must remain in scope as long as the Resolution Factory - * @note This Flyweight is cleared by this->Reset() + * @brief Get an EregResolution + * @param[in] i_er Error register + * @return reference to a resolution + * @post one instance with the param will exist + * @note the error register provided must remain in scope as long as the + * Resolution Factory + * @note This Flyweight is cleared by this->Reset() */ - Resolution & GetEregResolution(ErrorRegisterType & er); + Resolution & GetEregResolution(ErrorRegisterType & i_er); /** - * Get a TryResolution - * @param Resolution to try - * @param Resolution to use if the first one returns a non-zero return code - * @post one instance with these params will exist - * @note The resolutions provided mus remain in scope as long as the Resolution Factory - * @note This Flyweight is cleared by this->Reset() + * @brief Get a TryResolution + * @param[in] i_tryRes Resolution to try + * @param[in] i_defaultRes Resolution to use if the first one returns a + * non-zero return code + * @return reference to a resolution + * @post one instance with these params will exist + * @note The resolutions provided must remain in scope as long as the + * Resolution Factory + * @note This Flyweight is cleared by this->Reset() */ - Resolution & GetTryResolution(Resolution &tryRes, Resolution & defaultRes); + Resolution & GetTryResolution(Resolution &i_tryRes, Resolution & i_defaultRes); /** - * Get a FlagResolution - * @param servicedatacollector::flag - * @post only one instance of this object with this param will exist + * @brief Get a FlagResolution + * @param[in] i_flag + * @return reference to a resolution + * @post only one instance of this object with this param will exist */ - Resolution & GetFlagResolution(ServiceDataCollector::Flag flag); + Resolution & GetFlagResolution(ServiceDataCollector::Flag i_flag); /** - * Get a DumpResolution - * @param dump flags - * @post only one instance of this obect with these paramaters will exist + * @brief Get a DumpResolution + * @param[in] iDumpRequestContent + * @return reference to a resolution + * @post only one instance of this obect with these paramaters will exist */ #ifdef __HOSTBOOT_MODULE - Resolution & GetDumpResolution(/* FIXME: hwTableContent iDumpRequestContent = CONTENT_HW,*/ - TARGETING::TargetHandle_t i_pDumpHandle = NULL); + Resolution & GetDumpResolution(/* FIXME: hwTableContent + iDumpRequestContent = CONTENT_HW*/ + ); #else - Resolution & GetDumpResolution(hwTableContent iDumpRequestContent = CONTENT_HW, - TARGETING::TargetHandle_t i_pDumpHandle = NULL); - #endif + Resolution & GetDumpResolution( hwTableContent iDumpRequestContent = + CONTENT_HW ); + + #endif //ifdef __HOSTBOOT_MODULE /** - * Get a Gard Resolution - * @param The Gard Flag - * @post only one instance of this object with this param will exist + * @brief Get a Gard Resolution + * @param[in] i_gardErrorType gard error type + * @return reference to a resolution + * @post only one instance of this object with this param will exist */ - Resolution & GetGardResolution(GardResolution::ErrorType et); + Resolution & GetGardResolution( GardResolution::ErrorType i_gardErrorType ); // dg06a - end /** - * Get a Capture Resolution - * @param i_chip - The extensible chip to capture from. - * @param i_group - The group to capture. - * @post only one instance of this object with this param will exist + * @brief Get a Capture Resolution + * @param[in] i_group The group to capture. + * @return reference to a resolution + * @post only one instance of this object with this param will exist */ - Resolution & GetCaptureResolution(ExtensibleChip * i_chip, - uint32_t i_group); + Resolution & GetCaptureResolution( int32_t i_group ); /** - * Get a ClockResolution - * @param - * @post only one instance of this obect with these paramaters will exist + * @brief Get a ClockResolution + * @param[in] i_pClockHandle Target pointer pertaining to clock + * @param[in] i_targetType desired Targets type connected to clock + * @return reference to a resolution + * @post only one instance of this obect with these paramaters will exist */ // FIXME: Need support for clock targets // FIXME: Need support for clock targets types - Resolution & GetClockResolution(TARGETING::TargetHandle_t i_pClockHandle =NULL, - TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC); //should be repla + Resolution & GetClockResolution( + TARGETING::TargetHandle_t i_pClockHandle = NULL , + TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC ); /** Link resolutions to form a single resolution performing the actions of them all <ul> @@ -384,6 +369,12 @@ public: Resolution * xlnk1; Resolution * xlnk2; }; +#ifdef FLYWEIGHT_PROFILING +/** + * @brief prints memory allocated for object residing in flyweight + */ + void printStats(); +#endif private: // Data diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H index d7f77d39f..607a3bfe4 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H @@ -63,59 +63,54 @@ public: AnalyzeConnected(void); /** - Constructor - @param i_psourceHandle target handle of connection source - @param i_targetType i_targetType of desired unit that's connected to i_psourceHandle - @param i_idx: index into getConnected list of chip. + * @brief Constructor + * @param[in] i_targetType Target type of unit that's connected to given + * target + * @param[in] i_idx: index into getConnected list of chip. */ - AnalyzeConnected(TARGETING::TargetHandle_t i_psourceHandle , - TARGETING::TYPE i_targetType, - uint32_t i_idx =0xffffffff ); + AnalyzeConnected( TARGETING::TYPE i_targetType, + uint32_t i_idx =0xffffffff ); // ~prdfAnalyzeConnected(); default dtor is sufficient /** - Determine chip object for current connected unit and call its analyze func. - @param service data collector - @pre None - @return SUCCESS | non-zero if chip not found. - @note if the call to getConnected yeilds an invalid homId than the altResolution is called. If the - altResolution is NULL than the source is added to the callout list. + * @brief Determine chip object for current connected unit and call its + * analyze func. + * @param[io] io_service_data Refernce to STEP_CODE_DATA_STRUCT + * @return SUCCESS | non-zero if chip not found. + * @note if the call to getConnected yeilds NULL than the + * altResolution is called. If the altResolution is NULL than the + * source is added to the callout list. */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & io_service_data); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data ); virtual bool operator==(const AnalyzeConnected & r) const; private: // functions private: // Data - TARGETING::TargetHandle_t iv_psourceHandle; TARGETING::TYPE iv_targetType; uint32_t iv_idx; }; inline AnalyzeConnected::AnalyzeConnected(void) - : iv_psourceHandle(NULL), - iv_targetType(TARGETING::TYPE_NA), - iv_idx(0xffffffff) + : iv_targetType(TARGETING::TYPE_NA), + iv_idx(0xffffffff) { } inline AnalyzeConnected::AnalyzeConnected( - TARGETING::TargetHandle_t i_psourceHandle, TARGETING::TYPE i_targetType, - uint32_t i_idx) - : iv_psourceHandle(i_psourceHandle), - iv_targetType(i_targetType), - iv_idx(i_idx) + uint32_t i_idx ) + : iv_targetType(i_targetType), + iv_idx(i_idx) { } inline bool AnalyzeConnected::operator==(const AnalyzeConnected & r) const { - return (iv_psourceHandle == r.iv_psourceHandle && - iv_targetType == r.iv_targetType && - iv_idx == r.iv_idx); + return ( iv_targetType == r.iv_targetType && + iv_idx == r.iv_idx ); } } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H index 9215770f3..8535ea0a1 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnected.H @@ -69,41 +69,42 @@ public: CalloutConnected(void); /** - Constructor - @param i_psourceHandle handle of connection source - @param i_targetType type of desired unit that's connected to i_psourceHandle - @param i_idx index into getConnected list to callout - (i_idx = 0xffffffff means callout the first valid target) - @param i_priority callout priority @see srci.H for priority values - @param i_altResolution to use if the connection does not exist or is invalid. - If NULL than source is called out - @note Don't use this class to callout clocks - use prdfClockResolution + * @brief Constructor + * @param[in] i_targetType type of desired unit that's connected to + * i_psourceHandle + * @param[in] i_idx index into getConnected list to callout + * (i_idx = 0xffffffff means callout the first + * valid target) + * @param[in] i_priority callout priority @see srci.H for priority + * values + * @param[in] i_altResolution to use if the connection does not exist or + * is invalid. + * If NULL than source is called out + * @note Don't use this class to callout clocks - use ClockResolution */ - CalloutConnected(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx =0xffffffff , - PRDpriority i_priority = MRU_MED, - Resolution * i_altResolution = NULL); + CalloutConnected( TARGETING::TYPE i_targetType, + uint32_t i_idx =0xffffffff , + PRDpriority i_priority = MRU_MED, + Resolution * i_altResolution = NULL ); // ~CalloutConnected(); default dtor is sufficient /** - Determine callout for current connected unit and add to the service data - @param service data collector - @pre None - @post service_data is complete - @return SUCCESS | non-zero - @note if the call to getConnected yeilds an invalid homId than the altResolution is called. If the - altResolution is NULL than the source is added to the callout list. + * @brief calls out the target connected to target under analysis. + * @param[io] io_service_data Reference to STEP_CODE_DATA_STRUCT + * @post service_data is complete + * @return SUCCESS | non-zero + * @note if the call to getConnected yeilds an invalid target then + * altResolution is called. If the altResolution is NULL than the + * source is added to the callout list. */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & io_service_data); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data ); virtual bool operator==(const CalloutConnected & r) const; private: // functions private: // Data - TARGETING::TargetHandle_t iv_psourceHandle; TARGETING::TYPE iv_targetType; uint32_t iv_idx; PRDF::PRDpriority iv_priority; @@ -111,32 +112,28 @@ private: // Data }; inline CalloutConnected::CalloutConnected(void) -: iv_psourceHandle(NULL), - iv_targetType(TARGETING::TYPE_NA), +: iv_targetType(TARGETING::TYPE_NA), iv_idx(0xffffffff ), iv_priority(MRU_LOW), iv_altResolution(NULL) {} -inline CalloutConnected::CalloutConnected(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx, - PRDF::PRDpriority i_priority, - Resolution * i_altResolution) -: iv_psourceHandle(i_psourceHandle), - iv_targetType(i_targetType), - iv_idx(i_idx), - iv_priority(i_priority), - iv_altResolution(i_altResolution) -{} - -inline bool CalloutConnected::operator==(const CalloutConnected & r) const +inline CalloutConnected::CalloutConnected( TARGETING::TYPE i_targetType, + uint32_t i_idx, + PRDpriority i_priority, + Resolution * i_altResolution ): + iv_targetType( i_targetType ), + iv_idx( i_idx ), + iv_priority( i_priority ), + iv_altResolution( i_altResolution ) +{ } + +inline bool CalloutConnected::operator == ( const CalloutConnected & r ) const { - return (iv_psourceHandle == r.iv_psourceHandle && - iv_targetType == r.iv_targetType && - iv_idx == r.iv_idx && - iv_priority == r.iv_priority && - (iv_altResolution == r.iv_altResolution || &iv_altResolution == &r.iv_altResolution)); + return ( ( iv_targetType == r.iv_targetType ) && ( iv_idx == r.iv_idx ) && + ( iv_priority == r.iv_priority ) && + ( ( iv_altResolution == r.iv_altResolution ) || + ( &iv_altResolution == &r.iv_altResolution ) ) ); } } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C index 019735bbf..30d6e08cc 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C @@ -27,12 +27,15 @@ namespace PRDF { -int32_t CaptureResolution::Resolve(STEP_CODE_DATA_STRUCT & i_error) +int32_t CaptureResolution::Resolve( STEP_CODE_DATA_STRUCT & io_error ) { - if (NULL != iv_chip) - return iv_chip->CaptureErrorData(i_error.service_data->GetCaptureData(), - iv_captureGroup); - return SUCCESS; + ExtensibleChip * l_pResolutionChip = + ServiceDataCollector::getChipAnalyzed( ); + PRDF_ASSERT( NULL != l_pResolutionChip ); + + return l_pResolutionChip->CaptureErrorData( + io_error.service_data->GetCaptureData(), + iv_captureGroup ); }; } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H index d0c8eecb1..5311aeb4d 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H @@ -34,7 +34,7 @@ namespace PRDF class CaptureResolution : public Resolution { public: - CaptureResolution() : iv_chip(NULL), iv_captureGroup(0) {}; + CaptureResolution() :iv_captureGroup(0) {}; /** @fn CaptureResolution * @brief Typical constructor. @@ -42,27 +42,24 @@ class CaptureResolution : public Resolution * @param i_chip - Extensible chip object to capture from. * @param i_group - Capture-group to gather. */ - CaptureResolution(ExtensibleChip * i_chip, - uint32_t i_captureGroup) - : iv_chip(i_chip), - iv_captureGroup(i_captureGroup) {}; + CaptureResolution( uint32_t i_captureGroup ) : + iv_captureGroup(i_captureGroup) {}; - /** @fn Resolve - * @brief Perform capture. + /** @brief Perform capture. + * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @return SUCCESS| FAIL */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); /** * Comparison operator to aid in ResolutionFactory. */ - bool operator==(const CaptureResolution & i_rhs) - { return ((iv_chip == i_rhs.iv_chip) && - (iv_captureGroup == i_rhs.iv_captureGroup)); - }; + bool operator == ( const CaptureResolution & i_rhs ) + { + return ( iv_captureGroup == i_rhs.iv_captureGroup ); + }; private: - /** The chip to capture from */ - ExtensibleChip * iv_chip; /** The group id to capture */ uint32_t iv_captureGroup; diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H index bf07ba082..eb1a08c0e 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H @@ -58,35 +58,24 @@ class ClockResolution : public Resolution { public: /** - Constructor - <ul> - <br><b>Parameters: </b> - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ + * @brief constructor + * @param[in] i_pTargetHandle target pointer for clock source + * @param[in] i_targetType type of target connected to clock source + * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. + */ // FIXME: The default target type needs to be set to a PROC clock card. ClockResolution( TARGETING::TargetHandle_t i_pTargetHandle = NULL, TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC ) : - iv_ptargetClock(i_pTargetHandle), - iv_targetType(i_targetType) - {} + iv_ptargetClock( i_pTargetHandle ), + iv_targetType( i_targetType ) + { } /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryDump() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); + * @brief Resolve by adding MRU callout to the service data collector + * @param[io] io_data Reference to STEP_CODE_DATA_STRUCT + * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise + */ + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data ); /* * base class defines operator== so one is needed here @@ -94,7 +83,8 @@ public: */ bool operator==(const ClockResolution & r) const { - return ((iv_ptargetClock == r.iv_ptargetClock) && (iv_targetType == r.iv_targetType)); + return ( ( iv_ptargetClock == r.iv_ptargetClock ) && + ( iv_targetType == r.iv_targetType ) ); } private: // functions diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H index debae0c35..960a052f7 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H @@ -27,48 +27,50 @@ #include <iipResolution.h> #include <prdfExtensibleChip.H> #include <prdfPluginDef.H> - +#include <iipServiceDataCollector.h> namespace PRDF { class PluginCallResolution : public Resolution { private: - ExtensibleChip * iv_chip; ExtensibleChipFunction * iv_function; public: PluginCallResolution(void) - : iv_chip(NULL), iv_function(NULL) {} + : iv_function( NULL ) {} - PluginCallResolution(ExtensibleChip * i_chip, - ExtensibleChipFunction * i_function) - : iv_chip(i_chip), iv_function(i_function) {}; + PluginCallResolution( ExtensibleChipFunction * i_function ) + :iv_function(i_function) {}; - PluginCallResolution & operator=(const PluginCallResolution & r) + PluginCallResolution & operator = (const PluginCallResolution & r) { - iv_chip = r.iv_chip; iv_function = r.iv_function; return *this; } - bool operator==(const PluginCallResolution & r) + bool operator == (const PluginCallResolution & r) { - return (iv_chip == r.iv_chip)&&(iv_function == r.iv_function); + return (iv_function == r.iv_function); } virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error) + { + if (NULL == iv_function) { - if ((NULL == iv_chip) || (NULL == iv_function)) - return -1; + return FAIL; + + } + + ExtensibleChip * l_pResolutionChip = + ServiceDataCollector::getChipAnalyzed( ); - return (*iv_function) - (iv_chip, - PluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_error) - ); //@pw01 + PRDF_ASSERT( NULL != l_pResolutionChip ); - }; + return ( *iv_function ) ( l_pResolutionChip, PluginDef::bindParm + <STEP_CODE_DATA_STRUCT&>( i_error ) ); + }; }; } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H index 1b8a7925b..c748910b4 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H @@ -34,17 +34,10 @@ //-------------------------------------------------------------------- #include <map> - #include <prdfErrorSignature.H> - -#if !defined(iipResolution_h) #include <iipResolution.h> -#endif - -#if !defined(PRDFTIMER_H) #include <time.h> #include <prdfTimer.H> -#endif namespace PRDF { diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.C b/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.C index e8af4b078..10d2420f9 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.C @@ -44,17 +44,23 @@ namespace PRDF // Member Function Specifications //--------------------------------------------------------------------- -int32_t DumpResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t DumpResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { - uint32_t rc = SUCCESS; + uint32_t rc = SUCCESS; + TARGETING::TargetHandle_t l_ptarget = + ServiceDataCollector::getTargetAnalyzed( ); - #ifdef __HOSTBOOT_MODULE - error.service_data->SetDump(/*FIXME: ivDumpContent,*/ iv_pdumpHandle); - #else - error.service_data->SetDump(ivDumpContent,iv_pdumpHandle); - #endif + #ifdef __HOSTBOOT_MODULE - return rc; + io_serviceData.service_data->SetDump(/*FIXME: ivDumpContent,*/ l_ptarget ); + + #else + + io_serviceData.service_data->SetDump( ivDumpContent,l_ptarget ); + + #endif + + return rc; } } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.h index 72f05c685..4dfe2d91f 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdDumpResolution.h @@ -36,9 +36,7 @@ //-------------------------------------------------------------------- // Includes //-------------------------------------------------------------------- -#if !defined(iipResolution_h) #include <iipResolution.h> -#endif #ifndef __HOSTBOOT_MODULE @@ -64,25 +62,16 @@ class DumpResolution : public Resolution { public: /** - Constructor - <ul> - <br><b>Parameters: </b> Optional: Processor handle value - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> + * @brief Constructor + * @param[in] iDumpRequestContent + * @return Non-SUCCESS in internal function fails, SUCCESS otherwise. */ #ifdef __HOSTBOOT_MODULE - DumpResolution(/*FIXME: hwTableContent iDumpRequestContent = CONTENT_HW, */ - TARGETING::TargetHandle_t i_pdumpHandle =NULL ) : + DumpResolution(/*FIXME: hwTableContent iDumpRequestContent = CONTENT_HW, */) #else - DumpResolution(hwTableContent iDumpRequestContent = CONTENT_HW, - TARGETING::TargetHandle_t i_pdumpHandle =NULL ) : - ivDumpContent(iDumpRequestContent), + DumpResolution( hwTableContent iDumpRequestContent = CONTENT_HW ) + : ivDumpContent( iDumpRequestContent ) #endif - iv_pdumpHandle(i_pdumpHandle) {} /* @@ -99,17 +88,11 @@ public: // ~xspprdDumpResolution(); /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryDump() == this callout - <br><b>Exceptions: </b> None. - </ul><br> + * @brief updates the dump flag in service data collector + * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @return Non-SUCCESS in internal function fails, SUCCESS otherwise. */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); #ifndef __HOSTBOOT_MODULE @@ -117,10 +100,9 @@ public: * base class defines operator== so one is needed here * or the base class version will be used (bad) */ - bool operator==(const DumpResolution & r) const + bool operator == (const DumpResolution & r) const { - return ( (ivDumpContent == r.ivDumpContent) && - (iv_pdumpHandle == r.iv_pdumpHandle) ); + return ( ivDumpContent == r.ivDumpContent ); } #endif @@ -132,7 +114,6 @@ private: // Data hwTableContent ivDumpContent; #endif - TARGETING:: TargetHandle_t iv_pdumpHandle; }; } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h index 81e03f696..128802ba2 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h @@ -37,13 +37,9 @@ //-------------------------------------------------------------------- // Includes //-------------------------------------------------------------------- -#if !defined(iipResolution_h) #include <iipResolution.h> -#endif -#if !defined(iipServiceDataCollector_h) #include <iipServiceDataCollector.h> -#endif namespace PRDF { @@ -56,20 +52,19 @@ class FlagResolution : public Resolution { public: /** - Constructor - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> + * @brief Constructor + * @param[in] i_flag flag resolution + */ + + FlagResolution( ServiceDataCollector::Flag i_flag ): xFlag( i_flag ) + { } + + /** + * @brief Constructor */ - FlagResolution(ServiceDataCollector::Flag flag) - : xFlag(flag) {} - FlagResolution() - : xFlag(ServiceDataCollector::SERVICE_CALL) {} + FlagResolution() : xFlag( ServiceDataCollector::SERVICE_CALL ) + { } + /* Destructor @@ -84,18 +79,12 @@ public: */ // ~xspprdFlagResolution(); - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryFlag() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + /** + * @brief sets a flag in service data collector + * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @return None + */ + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); /* * base class defines operator== so one is needed here diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.C b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.C index 3945fb4cf..1a0fcd8d0 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.C @@ -63,10 +63,10 @@ namespace PRDF { -int32_t GardResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t GardResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) { - error.service_data->Gard(xErrorType); - return SUCCESS; + io_serviceData.service_data->Gard( xErrorType ); + return SUCCESS; } } // end namespace PRDF diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h index 74bf60940..da2db1066 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h @@ -39,9 +39,7 @@ // Includes //-------------------------------------------------------------------- -#if !defined(iipResolution_h) #include <iipResolution.h> -#endif namespace PRDF { @@ -77,18 +75,11 @@ public: /** - Constructor - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> + * @brief Constructor + * @param[in] i_et error type */ - GardResolution(ErrorType et=NoGard) - : xErrorType(et) {} + GardResolution( ErrorType i_et = NoGard ) : xErrorType( i_et ) + { } /* Destructor @@ -103,18 +94,12 @@ public: */ // ~xspprdGardResolution(); - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryGard() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + /** + * @brief gard resolution operation + * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @return SUCCESS + */ + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); bool operator==(const GardResolution & r) const { |