Am 14.02.2018 um 19:47 schrieb valdis.kletni...@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
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!
Kernelnewbies mailing list