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