Skip to content

Commit

Permalink
Merge pull request #13 from qiq-2022/threadnameFix
Browse files Browse the repository at this point in the history
Change the thread name of Patrace in perf
  • Loading branch information
per-mathisen-arm authored Mar 27, 2024
2 parents 39a151a + b596820 commit fb5facd
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions collectors/perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,21 +638,12 @@ void PerfCollector::create_perf_thread()
{
int tid =_stol(std::string(ent->d_name));
std::string thread_name = getThreadName(tid);

#ifdef ANDROID
if (!strncmp(thread_name.c_str(), "GLThread", 9) || !strncmp(thread_name.c_str(), "Thread-", 7))
{
mReplayThreads.emplace_back(tid, thread_name);
for (unsigned int i = 0; i < mMultiPMUEvents.size(); i++) mMultiPMUThreads.emplace_back(tid, thread_name);
}
#else
if (!strcmp(thread_name.c_str(), current_pName.c_str()))
if (!strncmp(thread_name.c_str(), "patrace-", 8))
{
mReplayThreads.emplace_back(tid, thread_name);
//each group of MultiPMUEvents have a thread
for (unsigned int i =0; i<mMultiPMUEvents.size();i++) mMultiPMUThreads.emplace_back(tid, thread_name);
}
#endif
if (mAllThread && !strncmp(thread_name.c_str(), "mali-", 5))
{
mBgThreads.emplace_back(tid, thread_name);
Expand Down

0 comments on commit fb5facd

Please sign in to comment.