| 1955 | |
| 1956 | |
| 1957 | bool KernelCache::SaveCacheInfoToKCView(std::lock_guard<std::mutex>&) |
| 1958 | { |
| 1959 | if (!m_cacheInfo) |
| 1960 | return false; |
| 1961 | |
| 1962 | // The initial load should only populate `m_cacheInfo` and should not modify any state. |
| 1963 | assert(m_modifiedState->loadedImages.size() == 0); |
| 1964 | |
| 1965 | auto data = m_cacheInfo->AsMetadata(); |
| 1966 | m_kcView->StoreMetadata(KernelCacheMetadata::Tag, data); |
| 1967 | m_kcView->GetParentView()->StoreMetadata(KernelCacheMetadata::Tag, data); |
| 1968 | |
| 1969 | { |
| 1970 | std::lock_guard lock(m_viewSpecificState->cacheInfoMutex); |
| 1971 | if (m_cacheInfo && !m_viewSpecificState->cacheInfo) |
| 1972 | m_viewSpecificState->cacheInfo = m_cacheInfo; |
| 1973 | else if (m_cacheInfo != m_viewSpecificState->cacheInfo) |
| 1974 | abort(); |
| 1975 | } |
| 1976 | |
| 1977 | m_metadataValid = true; |
| 1978 | return true; |
| 1979 | } |
| 1980 | |
| 1981 | |
| 1982 | bool KernelCache::SaveModifiedStateToKCView(std::lock_guard<std::mutex>&) |
nothing calls this directly
no test coverage detected