24 info() <<
"initialize" <<
endmsg;
26 for (
const auto& itr : m_pFilter.value()) {
30 parseFilter(itr,fnc,lib);
34 m_filterfnc.insert(fnc);
39 m_filterlib.insert(lib);
53 info() <<
"reinitialize" <<
endmsg;
65 info() <<
"listing all unchecked return codes:" <<
endmsg;
72 debug() <<
"all StatusCode instances where checked" <<
endmsg;
102 if (fnc ==
"_PyObject_GC_Malloc")
return;
104 if (fnc ==
"PyThread_get_thread_ident")
return;
105 if (fnc ==
"local")
return;
108 const string rlib = lib.
substr(lib.
rfind(
"/") + 1);
110 if (m_filterfnc.find(fnc) != m_filterfnc.end() ||
111 m_filterlib.find(rlib) != m_filterlib.end() ) {
117 fatal() <<
"Unchecked StatusCode in " << fnc <<
" from lib " 122 string key = fnc + lib;
124 auto itr = m_dat.
find(key);
126 if (itr != m_dat.end()) {
127 itr->second.count += 1;
130 const string rlib = lib.substr(lib.rfind(
"/") + 1);
150 os <<
"Num | Function | Source Library" <<
endl;
151 os <<
"----+--------------------------------+-------------------" 152 <<
"-----------------------" <<
endl;
154 for(
const auto& itr : m_dat) {
155 const auto& dat = itr.second;
158 os.
setf(ios_base::right,ios_base::adjustfield);
163 os.
setf(ios_base::left,ios_base::adjustfield);
167 os.
setf(ios_base::left,ios_base::adjustfield);
185 return d.second.fnc == str;
187 if (itr!=
std::end(m_dat)) m_dat.erase(itr);
197 return d.second.lib == str;
199 if (itr!=
std::end(m_dat)) m_dat.erase(itr);
208 auto loc = str.
find(
"=");
209 if (loc == std::string::npos) {
213 string key = str.
substr(0,loc);
214 string val = str.
substr(loc+1);
218 if (key ==
"FCN" || key ==
"FNC") {
221 }
else if (key ==
"LIB") {
228 warning() <<
"ignoring unknown token in Filter: " << str
StatusCode initialize() override
StatusCode reinitialize() override
bool isSuccess() const
Test for a status code of SUCCESS.
#define DECLARE_COMPONENT(type)
void parseFilter(const std::string &str, std::string &fnc, std::string &lib)
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
void regFnc(const std::string &func, const std::string &lib) override
void filterLib(const std::string &)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void filterFnc(const std::string &)
void list() const override
StatusCode finalize() override