<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 14.02.2018 um 19:47 schrieb <a
class="moz-txt-link-abbreviated"
href="mailto:valdis.kletnieks@vt.edu">valdis.kletnieks@vt.edu</a>:<br>
<br>
> What's wrong with this?<br>
> /usr/bin/strace /bin/ls /<br>
<br>
</div>
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.<br>
<br>
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.<br>
<br>
> Bonus hint: ls doesn't even call open() on the files, it calls
stat() on the files. <span class="moz-smiley-s1" title=":)"></span><br>
> Your open() calls are probably for shared libraries or stuff in
<span class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/lib/locale<span
class="moz-txt-tag">/<br>
<br>
Yes, using "ls /" <i>might not have been </i></span></span><i
class="moz-txt-slash"><span class="moz-txt-tag">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!<br>
</span></i>
</body>
</html>