Lines Matching refs:hash_index
153 size_t hash_index; in AddBacktrace() local
158 hash_index = cur_hash_index_++; in AddBacktrace()
160 key_to_index_.emplace(key, hash_index); in AddBacktrace()
162 frames_.emplace(hash_index, FrameInfoType{.references = 1, .frames = std::move(frames)}); in AddBacktrace()
164 backtraces_info_.emplace(hash_index, std::move(frames_info)); in AddBacktrace()
167 hash_index = entry->second; in AddBacktrace()
168 FrameInfoType* frame_info = &frames_[hash_index]; in AddBacktrace()
171 return hash_index; in AddBacktrace()
174 void PointerData::RemoveBacktrace(size_t hash_index) { in RemoveBacktrace() argument
175 if (hash_index <= kBacktraceEmptyIndex) { in RemoveBacktrace()
180 auto frame_entry = frames_.find(hash_index); in RemoveBacktrace()
182 error_log("hash_index %zu does not have matching frame data.", hash_index); in RemoveBacktrace()
189 frames_.erase(hash_index); in RemoveBacktrace()
191 backtraces_info_.erase(hash_index); in RemoveBacktrace()
198 size_t hash_index = 0; in Add() local
200 hash_index = AddBacktrace(g_debug->config().backtrace_frames()); in Add()
204 pointers_[pointer] = PointerInfoType{PointerInfoType::GetEncodedSize(pointer_size), hash_index}; in Add()
209 size_t hash_index; in Remove() local
218 hash_index = entry->second.hash_index; in Remove()
222 RemoveBacktrace(hash_index); in Remove()
227 size_t hash_index; in GetFrames() local
234 hash_index = entry->second.hash_index; in GetFrames()
237 if (hash_index <= kBacktraceEmptyIndex) { in GetFrames()
242 auto frame_entry = frames_.find(hash_index); in GetFrames()
255 void PointerData::LogBacktrace(size_t hash_index) { in LogBacktrace() argument
258 auto backtrace_info_entry = backtraces_info_.find(hash_index); in LogBacktrace()
264 auto frame_entry = frames_.find(hash_index); in LogBacktrace()
271 error_log(" hash_index %zu does not have matching frame data.", hash_index); in LogBacktrace()
285 if (info.hash_index > kBacktraceEmptyIndex) { in LogFreeError()
287 LogBacktrace(info.hash_index); in LogFreeError()
337 size_t hash_index = 0; in AddFreed() local
340 hash_index = AddBacktrace(num_frames); in AddFreed()
349 RemoveBacktrace(info.hash_index); in AddFreed()
353 free_pointers_.emplace_back(FreePointerInfoType{pointer, hash_index}); in AddFreed()
358 size_t hash_index = 0; in LogFreeBacktrace() local
364 hash_index = info.hash_index; in LogFreeBacktrace()
370 if (hash_index <= kBacktraceEmptyIndex) { in LogFreeBacktrace()
375 LogBacktrace(hash_index); in LogFreeBacktrace()
390 size_t hash_index = entry.second.hash_index; in GetList() local
391 if (hash_index > kBacktraceEmptyIndex) { in GetList()
392 auto frame_entry = frames_.find(hash_index); in GetList()
399 error_log("Pointer 0x%" PRIxPTR " hash_index %zu does not exist.", entry.first, hash_index); in GetList()
405 auto backtrace_entry = backtraces_info_.find(hash_index); in GetList()
407 … error_log("Pointer 0x%" PRIxPTR " hash_index %zu does not exist.", entry.first, hash_index); in GetList()
413 if (hash_index == 0 && only_with_backtrace) { in GetList()