Misc fixes before v1.8.0 release (#239)
* Update timemory submodule for OMPT - Updated OMPT support for OpenMP 5.2 * omnitrace exe cleanup - fixed "omnitrace --" segfault - added nullptr checks * CMake updates - moved omnitrace-interface-library definition up a directory - general cleanup - fixed branch/tag/ref for git submodule checkouts * Improve shutdown of causal profiling after duration limit * Fix dyninst minimum version number * Removed debug print from binary::get_link_map * Remove use of thread-pool in causal * Relax causal testing when variance is high * causal_gotcha utilities for blocking signals * Tweak to causal example * Install validate-causal-json as omnitrace-causal-print * simplify address_multirange * improve causal line saving
This commit is contained in:
committed by
GitHub
vanhempi
32b15fe7b7
commit
aadffbe2b1
@@ -567,6 +567,12 @@ process_modules(const std::vector<module_t*>& _app_modules)
|
||||
{
|
||||
parse_internal_libs_data();
|
||||
|
||||
auto _erase_nullptrs = [](auto& _vec) {
|
||||
_vec.erase(std::remove_if(_vec.begin(), _vec.end(),
|
||||
[](const auto* itr) { return (itr == nullptr); }),
|
||||
_vec.end());
|
||||
};
|
||||
|
||||
auto _wc = tim::component::wall_clock{};
|
||||
auto _pr = tim::component::peak_rss{};
|
||||
_wc.start();
|
||||
@@ -578,15 +584,22 @@ process_modules(const std::vector<module_t*>& _app_modules)
|
||||
if(_module) symtab_data.modules.emplace_back(_module);
|
||||
}
|
||||
|
||||
_erase_nullptrs(symtab_data.modules);
|
||||
|
||||
verbprintf(0, "Processing %zu modules...\n", symtab_data.modules.size());
|
||||
|
||||
if(symtab_data.modules.empty()) return;
|
||||
|
||||
const auto& _data = get_internal_libs_data();
|
||||
auto _names = std::set<std::string_view>{};
|
||||
for(const auto& itr : _data)
|
||||
{
|
||||
_names.emplace(itr.first);
|
||||
for(const auto& ditr : itr.second)
|
||||
_names.emplace(ditr.first);
|
||||
if(!itr.first.empty())
|
||||
{
|
||||
_names.emplace(itr.first);
|
||||
for(const auto& ditr : itr.second)
|
||||
_names.emplace(ditr.first);
|
||||
}
|
||||
}
|
||||
|
||||
for(auto* itr : symtab_data.modules)
|
||||
@@ -594,6 +607,8 @@ process_modules(const std::vector<module_t*>& _app_modules)
|
||||
const auto* _base_name = tim::filepath::basename(itr->fullName());
|
||||
auto _real_name = tim::filepath::realpath(itr->fullName(), nullptr, false);
|
||||
|
||||
if(!_base_name) continue;
|
||||
|
||||
if(_names.count(_base_name) == 0 && _names.count(_real_name) == 0)
|
||||
{
|
||||
verbprintf(2, "Processing symbol table for module '%s'...\n",
|
||||
@@ -601,13 +616,17 @@ process_modules(const std::vector<module_t*>& _app_modules)
|
||||
}
|
||||
|
||||
symtab_data.functions.emplace(itr, std::vector<symtab_func_t*>{});
|
||||
itr->getAllFunctions(symtab_data.functions.at(itr));
|
||||
if(!itr->getAllFunctions(symtab_data.functions.at(itr))) continue;
|
||||
_erase_nullptrs(symtab_data.functions.at(itr));
|
||||
|
||||
for(auto* fitr : symtab_data.functions.at(itr))
|
||||
{
|
||||
symtab_data.typed_func_names[tim::demangle(fitr->getName())] = fitr;
|
||||
|
||||
symtab_data.symbols.emplace(fitr, std::vector<symtab_symbol_t*>{});
|
||||
fitr->getSymbols(symtab_data.symbols.at(fitr));
|
||||
if(!fitr->getSymbols(symtab_data.symbols.at(fitr))) continue;
|
||||
_erase_nullptrs(symtab_data.symbols.at(fitr));
|
||||
|
||||
for(auto* sitr : symtab_data.symbols.at(fitr))
|
||||
{
|
||||
symtab_data.mangled_symbol_names[sitr->getMangledName()] = sitr;
|
||||
|
||||
@@ -265,9 +265,9 @@ get_library_search_paths_impl()
|
||||
}
|
||||
|
||||
// search hard-coded system paths
|
||||
for(const char* itr : { "/usr/local/lib", "/usr/share/lib", "/usr/lib", "/usr/lib64",
|
||||
"/usr/lib/x86_64-linux-gnu", "/lib", "/lib64",
|
||||
"/lib/x86_64-linux-gnu", "/usr/lib/i386-linux-gnu" })
|
||||
for(const char* itr :
|
||||
{ "/usr/local/lib", "/usr/share/lib", "/usr/lib", "/usr/lib64",
|
||||
"/usr/lib/x86_64-linux-gnu", "/lib", "/lib64", "/lib/x86_64-linux-gnu" })
|
||||
{
|
||||
_emplace_if_exists(itr);
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ main(int argc, char** argv)
|
||||
std::regex_replace(argv[j], std::regex{ "(.*)([ \t\n\r]+)$" }, "$1");
|
||||
copy_str(_cmdv[k], _v.c_str());
|
||||
}
|
||||
mutname = _cmdv[0];
|
||||
if(_cmdc > 0) mutname = _cmdv[0];
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user