fix lost_callback_wrapper, clang-format

This commit is contained in:
Pragyansh Chaturvedi
2025-10-20 05:17:40 +05:30
parent ec5377ba14
commit eebfe61ccc
2 changed files with 4 additions and 5 deletions

View File

@ -89,13 +89,12 @@ void PerfEventArray::lost_callback_wrapper(void *ctx, int cpu,
unsigned long long cnt) {
auto *self = static_cast<PerfEventArray *>(ctx);
if (self->lost_callback_.is_none()) {
return;
}
py::gil_scoped_acquire acquire;
try {
if (self->lost_callback_.is_none()) {
return;
}
self->lost_callback_(cpu, cnt);
} catch (const py::error_already_set &e) {
PyErr_Print();