brendangregg / perf-tools

Performance analysis tools based on Linux perf_events (aka perf) and ftrace
GNU General Public License v2.0
9.9k stars 1.65k forks source link

opensnoop - lastfile[pid] is no longer valid when we get lost events #81

Closed jamagin closed 4 years ago

jamagin commented 5 years ago

When the kernel informs us that we lost events "CPU:%d [LOST %lu EVENTS]\n", we cannot assume that a filename we saved from a do_sys_open line corresponds to the rval we get from the following sys_open line. With the existing logic, we do, and under certain conditions it's possible to get a spurious "valid" open of a nonexistent file in the opensnoop output.

(I'll have a PR for this shortly.)