[PATCH] D78896: [Support] Add file lock/unlock functions

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 21:53:03 PDT 2020


sepavloff added a comment.

In D78896#2010324 <https://reviews.llvm.org/D78896#2010324>, @amccarth wrote:

> If the goal is to synchronize writes to a highly contended log file, would it be better (and feasible) to have the individual threads/processes write timestamped output to separate streams that can be merged after-the-fact?


Such way is possible, but expensive. There must be a tool that collects these separate reports. And this tool must somehow know about build process so that it could pick up right files. Of course, it can pick up every report file in a build tree, but it this case somebody must clean the tree prior to build with getting statistics and this is a source of human errors. Such way is OK if there is some integrated system and running `make` is made by it and not by the user.

Instead, ability of compiler to log child process statistics to given file provide simple and fast way to obtain resource consumption data, which may be used not only by compiler developer but also by testers or other persons who need such data.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78896/new/

https://reviews.llvm.org/D78896





More information about the llvm-commits mailing list