mirror of
https://github.com/varun-r-mallya/pylibbpf.git
synced 2025-12-31 20:36:26 +00:00
fix lost_callback_wrapper, clang-format
This commit is contained in:
@ -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();
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
#define PYLIBBPF_PERF_EVENT_ARRAY_H
|
||||
|
||||
#include <libbpf.h>
|
||||
#include <memory>
|
||||
#include <pybind11/functional.h>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
class StructParser;
|
||||
class BpfMap;
|
||||
|
||||
Reference in New Issue
Block a user