diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2018-02-15 22:18:12 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-02-17 18:58:10 -0500 |
commit | 5b1c0a872db964361b0116473f577e89dc384763 (patch) | |
tree | c4e788b86339e4c7cf24e13836e48d6ecc236d53 | |
parent | 18a7e1928bde05a443235092feb799d5e0c36f53 (diff) | |
download | talos-hostboot-5b1c0a872db964361b0116473f577e89dc384763.tar.gz talos-hostboot-5b1c0a872db964361b0116473f577e89dc384763.zip |
PRD: Memory leak in prdfScanFacility
Change-Id: Iefadbeb4da9bae79d2595c78f02f1e9403f07769
CQ: SW417545
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54207
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54310
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
4 files changed, 39 insertions, 7 deletions
diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C index ad045614d..1607d95fb 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -189,6 +189,22 @@ void ScanFacility::ResetPluginRegister() } +//----------------------------------------------------------------------------- + +void ScanFacility::reset() +{ + iv_scomRegFw.clear(); + iv_attnRegFw.clear(); + iv_andRegFw.clear(); + iv_orRegFw.clear(); + iv_notRegFw.clear(); + iv_leftRegFw.clear(); + iv_sumRegFw.clear(); + iv_rightRegFw.clear(); + iv_constRegFw.clear(); + iv_pluginRegFw.clear(); +} + //------------------------------------------------------------------------------ #ifdef FLYWEIGHT_PROFILING void ScanFacility::printStats() @@ -205,7 +221,14 @@ void ScanFacility::printStats() iv_andRegFw.printStats(); PRDF_TRAC("Or Register"); iv_orRegFw.printStats(); - + PRDF_TRAC("AttnTypeRegisters FW" ); + iv_attnRegFw.printStats(); + PRDF_TRAC("SummaryRegisters FW" ); + iv_sumRegFw.printStats(); + PRDF_TRAC("ConstantRegisters FW" ); + iv_constRegFw.printStats(); + PRDF_TRAC("PluginRegisters FW" ); + iv_pluginRegFw.printStats(); } #endif diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H index c01efa6f8..02644f7b9 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -172,6 +172,14 @@ public: * exist. */ void ResetPluginRegister(); + + /** + * @brief Intended to reset all the flyweights if PRD is uninitialized due to + * a reIPL, reset/reload, or failover. This free up the memory and + * avoids memory leaks in the flyweights. + */ + void reset(); + #ifdef FLYWEIGHT_PROFILING /** * @brief prints memory allocated for object residing on flyweight diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C index d9ba1ab6e..dd5979efd 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -307,8 +307,6 @@ void ResolutionFactory::printStats() iv_flagResolutionFW.printStats( ); PRDF_TRAC("dumpResolution"); iv_dumpResolutionFW.printStats( ); - PRDF_TRAC("gardResolution"); - iv_gardResolutionFW.printStats( ); PRDF_TRAC("captureResolution"); iv_captureResolutionFW.printStats( ); PRDF_TRAC("clockResolution"); diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C index 36e1f7072..b1a935f49 100755 --- a/src/usr/diag/prdf/common/prdfMain_common.C +++ b/src/usr/diag/prdf/common/prdfMain_common.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -84,6 +84,9 @@ void unInitialize() delete systemPtr; systemPtr = NULL; g_initialized = false; + + ScanFacility::Access().reset(); + // Some Resolutions carry state and must be re-created - this call resets // what it needs to. ResolutionFactory::Access().Reset(); |