儲存庫 vbox 的更動 41686
- 時間撮記:
- 2012-6-13 下午04:27:49 (12 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp
r40504 r41686 706 706 * Allocate for each prmap_t object, a corresponding RTSOLCOREMAPINFO object. 707 707 */ 708 pSolProc->pMapInfoHead = (PRTSOLCOREMAPINFO)GetMemoryChunk(pSolCore, pSolProc->cMappings * sizeof(RTSOLCOREMAPINFO)); 708 pSolProc->pMapInfoHead = (PRTSOLCOREMAPINFO)GetMemoryChunk(pSolCore, 709 pSolProc->cMappings * sizeof(RTSOLCOREMAPINFO)); 709 710 if (pSolProc->pMapInfoHead) 710 711 { … … 774 775 } 775 776 else 776 CORELOGRELSYS((CORELOG_NAME "ProcReadMappings: FileReadNoIntr failed. rc=%Rrc cbMapFile=%u\n", rc, cbMapFile)); 777 { 778 CORELOGRELSYS((CORELOG_NAME "ProcReadMappings: FileReadNoIntr failed. rc=%Rrc cbMapFile=%u\n", rc, 779 cbMapFile)); 780 } 777 781 } 778 782 else … … 904 908 pStatus->pr_ustack = (uintptr_t)&pSolProc->pCurThreadCtx->uc_stack; 905 909 906 CORELOG((CORELOG_NAME "ProcReadThreads: patched dumper thread contextwith pre-dump time context.\n"));910 CORELOG((CORELOG_NAME "ProcReadThreads: patched dumper thread with pre-dump time context.\n")); 907 911 } 908 912 … … 939 943 else 940 944 { 941 CORELOGRELSYS((CORELOG_NAME "ProcReadThreads: huh!? cbStatusHdrAndData=%u prheader_t=%u entsize=%u\n", cbStatusHdrAndData,942 sizeof(prheader_t), pStatusHdr->pr_entsize));945 CORELOGRELSYS((CORELOG_NAME "ProcReadThreads: huh!? cbStatusHdrAndData=%u prheader_t=%u entsize=%u\n", 946 cbStatusHdrAndData, sizeof(prheader_t), pStatusHdr->pr_entsize)); 943 947 CORELOGRELSYS((CORELOG_NAME "ProcReadThreads: huh!? cbInfoHdrAndData=%u entsize=%u\n", cbInfoHdrAndData, 944 948 pStatusHdr->pr_entsize)); … … 1324 1328 * The assumption here is that threads can only increase not decrease across iterations. 1325 1329 */ 1326 #if 11327 1330 uint16_t cTries = 0; 1328 1331 uint64_t aThreads[4]; … … 1344 1347 } 1345 1348 return rc; 1346 #else1347 PRTSOLCOREPROCESS pSolProc = &pSolCore->SolProc;1348 1349 char szCurThread[128];1350 char szPath[PATH_MAX];1351 PRTDIR pDir = NULL;1352 1353 RTStrPrintf(szPath, sizeof(szPath), "/proc/%d/lwp", (int)pSolProc->Process);1354 RTStrPrintf(szCurThread, sizeof(szCurThread), "%d", (int)pSolProc->hCurThread);1355 1356 int rc = -1;1357 uint32_t cThreads = 0;1358 uint16_t cTries = 0;1359 for (cTries = 0; cTries < 10; cTries++)1360 {1361 uint32_t cRunningThreads = 0;1362 rc = RTDirOpen(&pDir, szPath);1363 if (RT_SUCCESS(rc))1364 {1365 /*1366 * Loop through all our threads & suspend them, multiple calls to _lwp_suspend() are okay.1367 */1368 RTDIRENTRY DirEntry;1369 while (RT_SUCCESS(RTDirRead(pDir, &DirEntry, NULL)))1370 {1371 if ( !strcmp(DirEntry.szName, ".")1372 || !strcmp(DirEntry.szName, ".."))1373 continue;1374 1375 if ( !strcmp(DirEntry.szName, szCurThread))1376 continue;1377 1378 int32_t ThreadId = RTStrToInt32(DirEntry.szName);1379 _lwp_suspend((lwpid_t)ThreadId);1380 ++cRunningThreads;1381 }1382 1383 if (cTries > 5 && cThreads == cRunningThreads)1384 {1385 rc = VINF_SUCCESS;1386 break;1387 }1388 cThreads = cRunningThreads;1389 RTDirClose(pDir);1390 }1391 else1392 {1393 CORELOGRELSYS((CORELOG_NAME "SuspendThreads: Failed to open %s cTries=%d\n", szPath, cTries));1394 rc = VERR_READ_ERROR;1395 break;1396 }1397 }1398 1399 if (RT_SUCCESS(rc))1400 CORELOG((CORELOG_NAME "SuspendThreads: Stopped %u threads successfully with %u tries\n", cThreads, cTries));1401 1402 return rc;1403 #endif1404 1349 } 1405 1350 … … 1446 1391 1447 1392 /* 1448 * This is a known violation of the 64-bit ELF spec., see xTracker #5211 comment#31393 * This is a known violation of the 64-bit ELF spec., see xTracker @bugref{5211} 1449 1394 * for the historic reasons as to the padding and namesz anomalies. 1450 1395 */ … … 1599 1544 if (RT_FAILURE(rc)) 1600 1545 { 1601 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader failed for %s. rc=%Rrc\n", aElfNotes[i].pszType, rc)); 1546 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader failed for %s. rc=%Rrc\n", 1547 aElfNotes[i].pszType, rc)); 1602 1548 break; 1603 1549 } … … 1656 1602 if (RT_FAILURE(rc)) 1657 1603 { 1658 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader failed for %s. rc=%Rrc\n", aElfNotes[i].pszType, rc)); 1604 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader failed for %s. rc=%Rrc\n", 1605 aElfNotes[i].pszType, rc)); 1659 1606 break; 1660 1607 } … … 1680 1627 if (RT_FAILURE(rc)) 1681 1628 { 1682 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader for NT_LWPSTATUS failed. rc=%Rrc\n", rc)); 1629 CORELOGRELSYS((CORELOG_NAME "ElfWriteNoteSection: ElfWriteNoteHeader for NT_LWPSTATUS failed. rc=%Rrc\n", 1630 rc)); 1683 1631 break; 1684 1632 } … … 1811 1759 } 1812 1760 1813 /** 1814 * Inner worker for rtCoreDumperWriteCore, which purpose is to 1815 * squash cleanup gotos. 1816 */ 1817 static int rtCoreDumperWriteCoreDoIt(PRTSOLCORE pSolCore, PFNRTCOREWRITER pfnWriter, 1761 /** 1762 * Inner worker for rtCoreDumperWriteCore, which purpose is to 1763 * squash cleanup gotos. 1764 */ 1765 static int rtCoreDumperWriteCoreDoIt(PRTSOLCORE pSolCore, PFNRTCOREWRITER pfnWriter, 1818 1766 PRTSOLCOREPROCESS pSolProc) 1819 1767 { … … 2078 2026 { 2079 2027 /* 2080 * Read process status, information such as number of active LWPs will be invalid since we just quiesced the process. 2028 * Read process status, information such as number of active LWPs will be 2029 * invalid since we just quiesced the process. 2081 2030 */ 2082 2031 rc = ProcReadStatus(pSolCore); … … 2261 2210 * to let our core dumper finish, on timeout trigger system dump. 2262 2211 */ 2263 CORELOGRELSYS((CORELOG_NAME "SignalHandler: Core dump already in progress! Waiting a while for completion Sig=%d.\n", Sig)); 2212 CORELOGRELSYS((CORELOG_NAME "SignalHandler: Core dump already in progress! Waiting a while for completion Sig=%d.\n", 2213 Sig)); 2264 2214 int64_t iTimeout = 16000; /* timeout (ms) */ 2265 2215 for (;;)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器