| 1809 | } |
| 1810 | |
| 1811 | bool |
| 1812 | prof_mdump(tsd_t *tsd, const char *filename) { |
| 1813 | cassert(config_prof); |
| 1814 | assert(tsd_reentrancy_level_get(tsd) == 0); |
| 1815 | |
| 1816 | if (!opt_prof || !prof_booted) { |
| 1817 | return true; |
| 1818 | } |
| 1819 | char filename_buf[DUMP_FILENAME_BUFSIZE]; |
| 1820 | if (filename == NULL) { |
| 1821 | /* No filename specified, so automatically generate one. */ |
| 1822 | if (opt_prof_prefix[0] == '\0') { |
| 1823 | return true; |
| 1824 | } |
| 1825 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 1826 | prof_dump_filename(filename_buf, 'm', prof_dump_mseq); |
| 1827 | prof_dump_mseq++; |
| 1828 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 1829 | filename = filename_buf; |
| 1830 | } |
| 1831 | return prof_dump(tsd, true, filename, false); |
| 1832 | } |
| 1833 | |
| 1834 | void |
| 1835 | prof_gdump(tsdn_t *tsdn) { |
no test coverage detected