| 1775 | } |
| 1776 | |
| 1777 | void |
| 1778 | prof_idump(tsdn_t *tsdn) { |
| 1779 | tsd_t *tsd; |
| 1780 | prof_tdata_t *tdata; |
| 1781 | |
| 1782 | cassert(config_prof); |
| 1783 | |
| 1784 | if (!prof_booted || tsdn_null(tsdn) || !prof_active_get_unlocked()) { |
| 1785 | return; |
| 1786 | } |
| 1787 | tsd = tsdn_tsd(tsdn); |
| 1788 | if (tsd_reentrancy_level_get(tsd) > 0) { |
| 1789 | return; |
| 1790 | } |
| 1791 | |
| 1792 | tdata = prof_tdata_get(tsd, false); |
| 1793 | if (tdata == NULL) { |
| 1794 | return; |
| 1795 | } |
| 1796 | if (tdata->enq) { |
| 1797 | tdata->enq_idump = true; |
| 1798 | return; |
| 1799 | } |
| 1800 | |
| 1801 | if (opt_prof_prefix[0] != '\0') { |
| 1802 | char filename[PATH_MAX + 1]; |
| 1803 | malloc_mutex_lock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 1804 | prof_dump_filename(filename, 'i', prof_dump_iseq); |
| 1805 | prof_dump_iseq++; |
| 1806 | malloc_mutex_unlock(tsd_tsdn(tsd), &prof_dump_seq_mtx); |
| 1807 | prof_dump(tsd, false, filename, false); |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | bool |
| 1812 | prof_mdump(tsd_t *tsd, const char *filename) { |
no test coverage detected