ftrace events: parameter tracing

Christof Warlich cwarlich at gmx.de
Wed Feb 14 14:26:01 EST 2018


Am 14.02.2018 um 19:47 schrieb valdis.kletnieks at vt.edu:

 > What's wrong with this?
 > /usr/bin/strace /bin/ls /

I started uisng strace, and you are right, it does what I want. But it 
is just too slow for my purpose: I want to record all dependencies, 
intermediates and results of an arbitrary build process to automatically 
record the build's dependencies. On subsequent runs of the build, these 
depencencies could then be used to decide which compoments must be 
rebuilt due to changed dependencies.

But using strace (or even ptrace directly) typically doubles the build 
times, which is unacceptable particularly because the whole point was to 
speed up (at least subsequent) build times.

 > Bonus hint: ls doesn't even call open() on the files, it calls stat() 
on the files.
 > Your open() calls are probably for shared libraries or stuff in 
/usr/lib/locale/

Yes, using "ls /" /might not have been /the best initial example, but 
listing the loaded shared libraries is perfectly fine for my purpose of 
dependency recording, because the "results" of running "ls -l" do depend 
on its shared libraries!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180214/0fd32234/attachment.html>


More information about the Kernelnewbies mailing list