diff options
author | Björn Gustavsson <[email protected]> | 2017-10-13 13:28:25 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-10-18 14:05:00 +0200 |
commit | 360d26b21c169b0c88d6ca43265cbcfa3ce9ef74 (patch) | |
tree | 7476c8aaed61a5f788f635c2d46807df72bab6cc /erts/include | |
parent | b73c4d012e122547c896f64d92ef9af3e531433e (diff) | |
download | otp-360d26b21c169b0c88d6ca43265cbcfa3ce9ef74.tar.gz otp-360d26b21c169b0c88d6ca43265cbcfa3ce9ef74.tar.bz2 otp-360d26b21c169b0c88d6ca43265cbcfa3ce9ef74.zip |
Buffer writing of crash dumps
Writing of crash dumps were done using unbuffered IO. This
is slow since many small writes are done.
Use a FILE* with an allocated buffer to obtain buffered IO.
I wrote a small test program that created 50000 binaries of 200 bytes
each and then created a crash dump. The crash dumping was an order of
magnitude faster with buffered IO than without.
Diffstat (limited to 'erts/include')
-rw-r--r-- | erts/include/internal/erl_printf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/include/internal/erl_printf.h b/erts/include/internal/erl_printf.h index f180a53f18..7e9807f6a8 100644 --- a/erts/include/internal/erl_printf.h +++ b/erts/include/internal/erl_printf.h @@ -44,6 +44,7 @@ struct erts_dsprintf_buf_t_ { typedef int (*fmtfn_t)(void*, char*, size_t); int erts_write_fd(void *vfdp, char* buf, size_t len); +int erts_write_fp(void *vfdp, char* buf, size_t len); int erts_write_ds(void *vdsbufp, char* buf, size_t len); int erts_printf(const char *, ...); |