Commit f89e5d25 authored by Matheus Marchini's avatar Matheus Marchini

add comment explaining why we're inserting in reverse order

parent 86d6c288
......@@ -352,6 +352,9 @@ int BPFtrace::run(std::unique_ptr<BpfOrc> bpforc)
BEGIN_trigger();
// NOTE (mmarchini): Apparently the kernel fires kprobe_events in the reverse
// order they were attached, so we insert them backwards to make sure blocks
// are executed in the same order they were declared.
auto r_probes = probes_.rbegin();
for (; r_probes != probes_.rend(); ++r_probes)
{
......
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