If you leave the program running long enough, the timestamp rolls over and events are recorded out of order.
One way to mitigate this is to have a global counter in the bpftrace script, increment it on every event, and report it along with the rest of the event data. You can timestamp the event on the proctrace side, but I suspect that will be less accurate because it depends on what kind of load proctrace is under.
If you leave the program running long enough, the timestamp rolls over and events are recorded out of order.
One way to mitigate this is to have a global counter in the
bpftrace
script, increment it on every event, and report it along with the rest of the event data. You can timestamp the event on theproctrace
side, but I suspect that will be less accurate because it depends on what kind of loadproctrace
is under.