-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ibeb45ceb1a2d0db1e3941b5b8ac5f9e2f5122770 RTC: 171913 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40942 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Squashed: I85a0240782b2985797a2ace1aa3eb9a9a18cb621 Squashed: I1663ee55509348cdaddf216d0b3c9ac527c21113 Squashed: Ib9a3bef7a4df3b1b2a5914cf4155dca569c11026 Squashed: I3739b49f17a5413a0ad9c3adfd555f74b91895cc Squashed: Ifc2e4501775a09ad06381970ba47be5b953312d8 Squashed: Id7f5648ed810f9505acecea99cb27af2d832a669 Squashed: I0ec33104ac7920282482e79c2376d115a1274b46 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41040 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
- Loading branch information
Showing
12 changed files
with
792 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/usr/diag/prdf/plat/mem/prdfMemTdFalseAlarm.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2017 */ | ||
/* [+] 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. */ | ||
/* You may obtain a copy of the License at */ | ||
/* */ | ||
/* http://www.apache.org/licenses/LICENSE-2.0 */ | ||
/* */ | ||
/* Unless required by applicable law or agreed to in writing, software */ | ||
/* distributed under the License is distributed on an "AS IS" BASIS, */ | ||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ | ||
/* implied. See the License for the specific language governing */ | ||
/* permissions and limitations under the License. */ | ||
/* */ | ||
/* IBM_PROLOG_END_TAG */ | ||
|
||
#ifndef __prdfMemTdFalseAlarm_H | ||
#define __prdfMemTdFalseAlarm_H | ||
|
||
#ifdef __HOSTBOOT_RUNTIME // All of this code is runtime only | ||
|
||
// Framework includes | ||
#include <iipServiceDataCollector.h> | ||
#include <prdfThresholdUtils.H> | ||
|
||
// Other includes | ||
#include <map> | ||
|
||
namespace PRDF | ||
{ | ||
|
||
/** | ||
* @brief At runtime, we have to keep a false alarm threshold for Targeted | ||
* Diagnostics to avoid flooding of intermittent errors. | ||
* | ||
* This class is intented to be a static class variable for each TD event class | ||
* that requires this type of thresholding. It will contain a map for each chip | ||
* and unique key within each chip to the threshold container. Note that the key | ||
* could be different per TD event class. For example, VCM events will use only | ||
* the master rank, where TPS events will use both the master and slave rank. | ||
*/ | ||
class TdFalseAlarm | ||
{ | ||
public: | ||
|
||
/** | ||
* @brief Constructor. | ||
* @param i_th Threshold value for all entries in the map. | ||
* @param i_int Threshold interval for all entries in the map. | ||
*/ | ||
TdFalseAlarm( uint8_t i_th, uint32_t i_int ) : | ||
iv_thVal(i_th), iv_thInt(i_int) | ||
{} | ||
|
||
/** | ||
* @brief Increments the false alarm count. | ||
* @param i_chip Target chip. | ||
* @param i_key Key relative to the chip. | ||
* @param io_sc The step code data struct. | ||
* @return True if false alarm count has reached threshold, false otherwise. | ||
*/ | ||
bool inc( ExtensibleChip * i_chip, uint32_t i_key, | ||
STEP_CODE_DATA_STRUCT & io_sc ) | ||
{ | ||
// Create a new entry if an entry does not exist. | ||
if ( iv_map[i_chip].end() == iv_map[i_chip].find(i_key) ) | ||
iv_map[i_chip][i_key] = TimeBasedThreshold( iv_thVal, iv_thInt ); | ||
|
||
return iv_map[i_chip][i_key].inc( io_sc ); | ||
} | ||
|
||
private: | ||
|
||
const uint8_t iv_thVal; ///< Threshold value for all entries in the map. | ||
const uint32_t iv_thInt; ///< Threshold interval for all entries in the map. | ||
|
||
/** A nested map containing the thresholds for each chip and key. */ | ||
std::map< ExtensibleChip *, std::map<uint32_t,TimeBasedThreshold> > iv_map; | ||
}; | ||
|
||
} // end namespace PRDF | ||
|
||
#endif // __HOSTBOOT_RUNTIME | ||
|
||
#endif // __prdfMemTdFalseAlarm_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.