aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/beam_utils_SUITE.erl
diff options
context:
space:
mode:
authorNathan Long <[email protected]>2016-09-13 08:36:42 -0400
committerNathan Long <[email protected]>2016-09-24 06:55:11 -0400
commit07b0f4315b079cce7aeef7babdba1bbb686de611 (patch)
tree0b7c8cb07090e61ba39bc7f85229cc0d6a96be90 /lib/compiler/test/beam_utils_SUITE.erl
parent7228e3ea97f8e2a19be97740053892e67cc20baf (diff)
downloadotp-07b0f4315b079cce7aeef7babdba1bbb686de611.tar.gz
otp-07b0f4315b079cce7aeef7babdba1bbb686de611.tar.bz2
otp-07b0f4315b079cce7aeef7babdba1bbb686de611.zip
Let file:write_file/3 use writev
Previously, this function would turn any input into a single binary before writing. This meant it could not take advantage of the `writev` system call if it was given a list of binaries and told to write with `raw` mode. To see this, start an erlang shell on the parent commit, and also start this dtrace script: https://github.com/evanmiller/tracewrite like this: sudo dtrace -s tracewrite.d -p $(pgrep beam) In the erlang shell, run the following: file:write_file("/tmp/tmp.txt", [<<97,98>>, <<98,97>>], [raw]). In the dtrace output, you will see that the system call used is `write`. Now repeat with this commit, and you will see that `writev` is used.
Diffstat (limited to 'lib/compiler/test/beam_utils_SUITE.erl')
0 files changed, 0 insertions, 0 deletions