Fix thread index values (#287)
* Update PTL
- PTL submodule waits for threads to start before proceeding
* Initialize perfetto after init_bundle
- perfetto thread creation after pthread_create wrapped
* backtrace component update
- exclude gotcha call-tree
* callchain component update
- callchain::get sorts based on timestamp
- callchain::sample supports duplicate IPs (recursion)
* Bump version to 1.10.1
[ROCm/rocprofiler-systems commit: de9f0e4c10]
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
973f5bc348
commit
97011ea642
+10
-1
@@ -120,6 +120,9 @@ callchain::get() const
|
||||
itr.second.pop_back();
|
||||
}
|
||||
|
||||
std::sort(_v.begin(), _v.end(),
|
||||
[](const auto& _lhs, const auto& _rhs) { return _lhs.first < _rhs.first; });
|
||||
|
||||
return _v;
|
||||
}
|
||||
|
||||
@@ -193,9 +196,15 @@ callchain::sample(int signo)
|
||||
auto _data = record{};
|
||||
_data.timestamp = itr.get_time();
|
||||
_data.data.emplace_back(_ip);
|
||||
bool _skip_ip = true;
|
||||
for(auto ditr : itr.get_callchain())
|
||||
{
|
||||
if(ditr != _ip) _data.data.emplace_back(ditr);
|
||||
// skip the first instance of current IP but allow after that since this
|
||||
// might be a recursive call
|
||||
if(ditr == _ip && _skip_ip)
|
||||
_skip_ip = false;
|
||||
else
|
||||
_data.data.emplace_back(ditr);
|
||||
if(_data.data.size() == _data.data.capacity()) break;
|
||||
}
|
||||
if(!_data.data.empty()) m_data.emplace_back(_data);
|
||||
|
||||
Reference in New Issue
Block a user