| 2009 | } |
| 2010 | |
| 2011 | static void |
| 2012 | prof_fdump(void) { |
| 2013 | tsd_t *tsd; |
| 2014 | char filename[DUMP_FILENAME_BUFSIZE]; |
| 2015 | |
| 2016 | cassert(config_prof); |
| 2017 | assert(opt_prof_final); |
| 2018 | assert(opt_prof_prefix[0] != '\0'); |
| 2019 | |
| 2020 | if (!prof_booted) { |
| 2021 | return; |
| 2022 | } |
| 2023 | tsd = tsd_fetch(); |
| 2024 | assert(tsd_reentrancy_level_get(tsd) == 0); |
| 2025 | |
| 2026 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2027 | prof_dump_filename(filename, 'f', VSEQ_INVALID); |
| 2028 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2029 | prof_dump(tsd, false, filename, opt_prof_leak); |
| 2030 | } |
| 2031 | |
| 2032 | bool |
| 2033 | prof_accum_init(tsdn_t *tsdn, prof_accum_t *prof_accum) { |
nothing calls this directly
no test coverage detected