| 291 | } |
| 292 | |
| 293 | void DebugTarget::CleanupHotHeap() |
| 294 | { |
| 295 | //TODO: We have more work to do before this catches all the required cases |
| 296 | return; |
| 297 | |
| 298 | bool hadRemovals = false; |
| 299 | for (int dwarfIdx = 0; dwarfIdx < (int)mDbgModules.size(); dwarfIdx++) |
| 300 | { |
| 301 | DbgModule* dbgModule = mDbgModules[dwarfIdx]; |
| 302 | if (dbgModule->IsObjectFile()) |
| 303 | { |
| 304 | if (!mHotHeap->IsReferenced(dbgModule->mImageBase, dbgModule->mImageSize)) |
| 305 | { |
| 306 | Beefy::OutputDebugStrF("Clearing hot module %p data from %@ to %@\n", dbgModule, dbgModule->mImageBase, dbgModule->mImageBase + dbgModule->mImageSize); |
| 307 | |
| 308 | BfLogDbg("Unloading hot idx: %s@%d\n", dbgModule->mFilePath.c_str(), dbgModule->mHotIdx); |
| 309 | dbgModule->mDeleting = true; |
| 310 | dbgModule->RemoveTargetData(); |
| 311 | hadRemovals = true; |
| 312 | } |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | if (hadRemovals) |
| 317 | { |
| 318 | RemoveTargetData(); |
| 319 | for (int dwarfIdx = 0; dwarfIdx < (int)mDbgModules.size(); dwarfIdx++) |
| 320 | { |
| 321 | DbgModule* dbgModule = mDbgModules[dwarfIdx]; |
| 322 | if (dbgModule->mDeleting) |
| 323 | { |
| 324 | ClearFindDbgModuleCache(); |
| 325 | mDbgModules.RemoveAt(dwarfIdx); |
| 326 | bool success = mDbgModuleMap.Remove(dbgModule->mId); |
| 327 | BF_ASSERT_REL(success); |
| 328 | delete dbgModule; |
| 329 | dwarfIdx--; |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void DebugTarget::RehupSrcFiles() |
| 336 | { |
nothing calls this directly
no test coverage detected