MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / hasPerfEventRefreshBug

Function hasPerfEventRefreshBug

src/perfEvents_linux.cpp:177–183  ·  view source on GitHub ↗

Workaround for the kernel bug: PERF_EVENT_IOC_REFRESH can hang the entire system on Linux 6.16.x and 6.17.x. See https://github.com/async-profiler/async-profiler/issues/1578

Source from the content-addressed store, hash-verified

175// the entire system on Linux 6.16.x and 6.17.x.
176// See https://github.com/async-profiler/async-profiler/issues/1578
177static bool hasPerfEventRefreshBug() {
178 static struct utsname u{};
179 if (u.release[0] == 0 && uname(&u) != 0) {
180 return false;
181 }
182 return strncmp(u.release, "6.16.", 5) == 0 || strncmp(u.release, "6.17.", 5) == 0;
183}
184
185struct FunctionWithCounter {
186 const char* name;

Callers 1

startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected