MCPcopy Create free account
hub / github.com/bytedance/bolt / setPrefetch

Method setPrefetch

bolt/common/caching/AsyncDataCache.cpp:108–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108memory::MachinePageCount AsyncDataCacheEntry::setPrefetch(bool flag) {
109 isPrefetch_ = flag;
110 const auto numPages = memory::AllocationTraits::numPages(size_);
111 return shard_->cache()->incrementPrefetchPages(flag ? numPages : -numPages);
112}
113
114void AsyncDataCacheEntry::initialize(FileCacheKey key) {
115 BOLT_CHECK(isExclusive());

Callers 6

loadDataMethod · 0.80
loadDataMethod · 0.80
findOrCreateMethod · 0.80
removeEntryLockedMethod · 0.80
newEntryMethod · 0.80
TEST_FFunction · 0.80

Calls 2

cacheMethod · 0.45

Tested by 2

newEntryMethod · 0.64
TEST_FFunction · 0.64