fix omnitrace print-* with libraries (#94)
* fix omnitrace print-* with libraries * timemory submodule update * Update workflows to use ./bin/omnitrace instead of ./omnitrace * cmake format * update timemory submodule - fix ODR violations in utility/procfs * cmake updates - uniform find_package for all ROCm-based libraries * tweak transpose example - throw exception instead of std::exit * Inspect cmdv name before assuming not exe - some ELF execs "think" they are libraries so only assume rewrite + simulate + all-functions if filename looks like library - adds some test for --print-available -- <library> * Fix _has_lib_prefix when command is < 3 * Updates and reverts to omnitrace exe - update module_function operator< and operator== - add function_signature operator< - refactor module_function ctor - revert some previous changes w.r.t. simulate and include_unninstr * Fix source/bin/tests to use same output dir as tests * cmake format * Segfault mitigation + refactor + modify function iteration - refactor module_function ctor to avoid segfaults - string_t -> std::string - replace std::string with std::string_view in some places - get_name(module_t*) - get_name(procedure_t*) - disable using both app_modules and app_functions - new option: --parse-all-modules to iterate over app_modules - removed some unused code w.r.t. debug info * Disable module_function address range for uninstrumentable functions * Disable module_function address range for uninstrumentable functions * Refactored getting file/line info and init/fini - use dyninst insertInitCallback and insertFiniCallback if main not found - fixed all issues with segmentation faults in --simulate --all-functions * revert changes to Findrocprofiler.cmake
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6bc86d1111
Коммит
d04cbe862e
@@ -22,25 +22,26 @@
|
||||
|
||||
#include "function_signature.hpp"
|
||||
|
||||
function_signature::function_signature(string_t _ret, const string_t& _name,
|
||||
string_t _file, location_t _row, location_t _col,
|
||||
bool _loop, bool _info_beg, bool _info_end)
|
||||
function_signature::function_signature(std::string_view _ret, std::string_view _name,
|
||||
std::string_view _file, location_t _row,
|
||||
location_t _col, bool _loop, bool _info_beg,
|
||||
bool _info_end)
|
||||
: m_loop(_loop)
|
||||
, m_info_beg(_info_beg)
|
||||
, m_info_end(_info_end)
|
||||
, m_row(std::move(_row))
|
||||
, m_col(std::move(_col))
|
||||
, m_return(std::move(_ret))
|
||||
, m_name(tim::demangle(_name))
|
||||
, m_file(std::move(_file))
|
||||
, m_return(_ret)
|
||||
, m_name(tim::demangle(_name.data()))
|
||||
, m_file(_file)
|
||||
{
|
||||
if(m_file.find('/') != string_t::npos)
|
||||
if(m_file.find('/') != std::string_view::npos)
|
||||
m_file = m_file.substr(m_file.find_last_of('/') + 1);
|
||||
}
|
||||
|
||||
function_signature::function_signature(const string_t& _ret, const string_t& _name,
|
||||
const string_t& _file,
|
||||
const std::vector<string_t>& _params,
|
||||
function_signature::function_signature(std::string_view _ret, std::string_view _name,
|
||||
std::string_view _file,
|
||||
const std::vector<std::string>& _params,
|
||||
location_t _row, location_t _col, bool _loop,
|
||||
bool _info_beg, bool _info_end)
|
||||
: function_signature(_ret, _name, _file, _row, _col, _loop, _info_beg, _info_end)
|
||||
@@ -52,13 +53,13 @@ function_signature::function_signature(const string_t& _ret, const string_t& _na
|
||||
m_params += ")";
|
||||
}
|
||||
|
||||
string_t
|
||||
std::string
|
||||
function_signature::get(function_signature& sig)
|
||||
{
|
||||
return sig.get();
|
||||
}
|
||||
|
||||
string_t
|
||||
std::string
|
||||
function_signature::get(bool _all, bool _save) const
|
||||
{
|
||||
if(!_all && _save && !m_signature.empty()) return m_signature;
|
||||
@@ -103,7 +104,7 @@ function_signature::get(bool _all, bool _save) const
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
string_t
|
||||
std::string
|
||||
function_signature::get_coverage(bool _basic_block) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
Ссылка в новой задаче
Block a user