| 2080 | } |
| 2081 | |
| 2082 | bool |
| 2083 | prof_mdump(tsd_t *tsd, const char *filename) { |
| 2084 | cassert(config_prof); |
| 2085 | assert(tsd_reentrancy_level_get(tsd) == 0); |
| 2086 | |
| 2087 | if (!opt_prof || !prof_booted) { |
| 2088 | return true; |
| 2089 | } |
| 2090 | char filename_buf[DUMP_FILENAME_BUFSIZE]; |
| 2091 | if (filename == NULL) { |
| 2092 | /* No filename specified, so automatically generate one. */ |
| 2093 | if (opt_prof_prefix[0] == '\0') { |
| 2094 | return true; |
| 2095 | } |
| 2096 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2097 | prof_dump_filename(filename_buf, 'm', prof_dump_mseq); |
| 2098 | prof_dump_mseq++; |
| 2099 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2100 | filename = filename_buf; |
| 2101 | } |
| 2102 | return prof_dump(tsd, true, filename, false); |
| 2103 | } |
| 2104 | |
| 2105 | void |
| 2106 | prof_gdump(tsdn_t *tsdn) { |
no test coverage detected