| 2046 | } |
| 2047 | |
| 2048 | void |
| 2049 | prof_idump(tsdn_t *tsdn) { |
| 2050 | tsd_t *tsd; |
| 2051 | prof_tdata_t *tdata; |
| 2052 | |
| 2053 | cassert(config_prof); |
| 2054 | |
| 2055 | if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { |
| 2056 | return; |
| 2057 | } |
| 2058 | tsd = tsdn_tsd(tsdn); |
| 2059 | if (tsd_reentrancy_level_get(tsd) > 0) { |
| 2060 | return; |
| 2061 | } |
| 2062 | |
| 2063 | tdata = prof_tdata_get(tsd, false); |
| 2064 | if (tdata == NULL) { |
| 2065 | return; |
| 2066 | } |
| 2067 | if (tdata->enq) { |
| 2068 | tdata->enq_idump = true; |
| 2069 | return; |
| 2070 | } |
| 2071 | |
| 2072 | if (opt_prof_prefix[0] != '\0') { |
| 2073 | char filename[PATH_MAX + 1]; |
| 2074 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2075 | prof_dump_filename(filename, 'i', prof_dump_iseq); |
| 2076 | prof_dump_iseq++; |
| 2077 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 2078 | prof_dump(tsd, false, filename, false); |
| 2079 | } |
| 2080 | } |
| 2081 | |
| 2082 | bool |
| 2083 | prof_mdump(tsd_t *tsd, const char *filename) { |
no test coverage detected