iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

fix zfsslower check for zpl_read / zpl_iter (fixes #4952) #4953

Closed seb314 closed 6 months ago

seb314 commented 6 months ago

This fixes a regression of #1248: The original fix #1324 assumed that BPF.get_kprobe_functions checks the given regex against any substring of the function name, but 2b203ea later changed get_kprobe_functions to do re.fullmatch instead.

seb314 commented 6 months ago

Note: It seems likely that other uses of get_kprobe_functions that predate https://github.com/iovisor/bcc/commit/2b203ea20d5db4d36e16c07592eb8cc5e919e46c are similarly affected, but I haven't looked into those, so far.

More loosely related Question: Are any of the other functions from the const struct file_operations zpl_file_operations section in openzfs's zpl_file.c relevant for zfsslower?

seb314 commented 6 months ago

Re the failing test, the log sais something about FAIL: test_offwaketime (__main__.SmokeTests), I'm not sure how to interpret that.

yonghong-song commented 6 months ago

It seems likely that other uses of get_kprobe_functions that predate https://github.com/iovisor/bcc/commit/2b203ea20d5db4d36e16c07592eb8cc5e919e46c are similarly affected, but I haven't looked into those, so far. Thanks. It is indeed great if you can help take a look as well.