| 1823 | } |
| 1824 | |
| 1825 | void |
| 1826 | prof_gdump(tsdn_t *tsdn) { |
| 1827 | tsd_t *tsd; |
| 1828 | prof_tdata_t *tdata; |
| 1829 | |
| 1830 | cassert(config_prof); |
| 1831 | |
| 1832 | if (!prof_booted || tsdn_null(tsdn)) { |
| 1833 | return; |
| 1834 | } |
| 1835 | tsd = tsdn_tsd(tsdn); |
| 1836 | if (tsd_reentrancy_level_get(tsd) > 0) { |
| 1837 | return; |
| 1838 | } |
| 1839 | |
| 1840 | tdata = prof_tdata_get(tsd, false); |
| 1841 | if (tdata == NULL) { |
| 1842 | return; |
| 1843 | } |
| 1844 | if (tdata->enq) { |
| 1845 | tdata->enq_gdump = true; |
| 1846 | return; |
| 1847 | } |
| 1848 | |
| 1849 | if (opt_prof_prefix[0] != '\0') { |
| 1850 | char filename[DUMP_FILENAME_BUFSIZE]; |
| 1851 | malloc_mutex_lock(tsdn, &prof_dump_seq_mtx); |
| 1852 | prof_dump_filename(filename, 'u', prof_dump_useq); |
| 1853 | prof_dump_useq++; |
| 1854 | malloc_mutex_unlock(tsdn, &prof_dump_seq_mtx); |
| 1855 | prof_dump(tsd, false, filename, false); |
| 1856 | } |
| 1857 | } |
| 1858 | |
| 1859 | static void |
| 1860 | prof_bt_hash(const void *key, size_t r_hash[2]) { |
no test coverage detected