commit | 4f37ef693e3d5903ce07dc0b61c0da320b35e3d9 | [log] [tgz] |
---|---|---|
author | Jason Evans <je@fb.com> | Thu Jan 16 13:23:56 2014 -0800 |
committer | Jason Evans <je@fb.com> | Thu Jan 16 13:36:38 2014 -0800 |
tree | 9b69f45ad479a1971528ee1dbc4f743fd27d5353 | |
parent | 35f1bc4e4bd14e07257f6eddbbbcf0c01b52ba5c [diff] |
Refactor prof_dump() to reduce contention. Refactor prof_dump() to use a two pass algorithm, and prof_leave() prior to the second pass. This avoids write(2) system calls while holding critical prof resources. Fix prof_dump() to close the dump file descriptor for all relevant error paths. Minimize the size of prof-related static buffers when prof is disabled. This saves roughly 65 KiB of application memory for non-prof builds. Refactor prof_ctx_init() out of prof_lookup_global().