Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error of Tower PMU after upgrade to kernel6.6 #17

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions collectors/perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,18 @@ void PerfCollector::create_perf_thread()
{
std::string current_pName = getThreadName(0);

if(!mCSPMUEvents.empty())
{
int i=0;
for (auto pair : mCSPMUEvents)
{
mCSPMUThreads.emplace_back(getpid(), current_pName);
mCSPMUThreads[i].device_name = pair.second[0].device;
i++;
}
return;
}

DIR *dirp = NULL;
if ((dirp = opendir("/proc/self/task")) == NULL)
return;
Expand Down Expand Up @@ -679,14 +691,6 @@ void PerfCollector::create_perf_thread()
}
closedir(dirp);

int i=0;
for (auto pair : mCSPMUEvents)
{
mCSPMUThreads.emplace_back(getpid(), current_pName);
mCSPMUThreads[i].device_name = pair.second[0].device;
i++;
}

if (mBookerEvents.size() > 0)
{
mBookerThread.emplace_back(getpid(), current_pName);
Expand Down
Loading