| 636 | } |
| 637 | |
| 638 | bool |
| 639 | prof_mdump_impl(tsd_t *tsd, const char *filename) { |
| 640 | char filename_buf[DUMP_FILENAME_BUFSIZE]; |
| 641 | if (filename == NULL) { |
| 642 | /* No filename specified, so automatically generate one. */ |
| 643 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_filename_mtx); |
| 644 | if (prof_prefix_get(tsd_tsdn(tsd))[0] == '\0') { |
| 645 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_filename_mtx); |
| 646 | return true; |
| 647 | } |
| 648 | prof_dump_filename(tsd, filename_buf, 'm', prof_dump_mseq); |
| 649 | prof_dump_mseq++; |
| 650 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_filename_mtx); |
| 651 | filename = filename_buf; |
| 652 | } |
| 653 | return prof_dump(tsd, true, filename, false); |
| 654 | } |
| 655 | |
| 656 | void |
| 657 | prof_gdump_impl(tsd_t *tsd) { |
no test coverage detected