]> git.lizzy.rs Git - rust.git/commit
Buffer LLVM's object output stream
authorAlex Crichton <alex@alexcrichton.com>
Mon, 20 Aug 2018 06:44:25 +0000 (23:44 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 20 Aug 2018 06:46:32 +0000 (23:46 -0700)
commit9d54bf8df2677dd5f985838c5686efaa24a73b6c
tree6db4939f40969431412f1ec2b2e77d31e71d5bae
parent3ac79c718475fd29b8be34dde667b683390c2aee
Buffer LLVM's object output stream

In some profiling on OSX I saw the `write` syscall as quite high up on
the profiling graph, which is definitely not good! It looks like we're
setting the output stream of an object file as directly to a file
descriptor which means that we run the risk of doing lots of little
writes rather than a few large writes.

This commit fixes this issue by adding a buffered stream on the output,
causing the `write` syscall to disappear from the profiles on OSX.
src/rustllvm/PassWrapper.cpp