Commit b3dd6731 authored by Vicent Marti's avatar Vicent Marti

lua: Do not try to detach buffers as kprobes

parent 06b5ce51
......@@ -41,7 +41,8 @@ function Bpf.static.cleanup_probes()
local function detach_all(probe_type, all_probes)
for key, probe in pairs(all_probes) do
libbcc.perf_reader_free(probe)
if type(key) == "string" then
-- skip bcc-specific kprobes
if not key:starts("bcc:") then
local desc = string.format("-:%s/%s", probe_type, key)
log.info("detaching %s", desc)
......
......@@ -236,7 +236,7 @@ function PerfEventArray:initialize(bpf, map_id, map_fd, key_type, leaf_type)
end
local function _perf_id(id, cpu)
return string.format("perf_event_array:%d:%d", tonumber(id), cpu or 0)
return string.format("bcc:perf_event_array:%d:%d", tonumber(id), cpu or 0)
end
function PerfEventArray:_open_perf_buffer(cpu, callback, ctype)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment