MCPcopy Create free account
hub / github.com/apache/impala / GetMemCharge

Method GetMemCharge

be/src/codegen/llvm-codegen-cache-test.cc:340–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340int64_t LlvmCodeGenCacheTest::GetMemCharge(
341 LlvmCodeGen* codegen, const string& key_str, bool is_normal_mode) {
342 if (is_normal_mode) {
343 return codegen->engine_cache()->objSize() + key_str.size()
344 + sizeof(CodeGenCacheEntry);
345 }
346 // Optimal mode would use hash code and length as the key.
347 return codegen->engine_cache()->objSize() + CodeGenCacheKey::OptimalKeySize
348 + sizeof(CodeGenCacheEntry);
349}
350
351/// Test the situation that the codegen cache hits the limit of capacity, in this case,
352/// eviction is needed when new insertion comes.

Callers

nothing calls this directly

Calls 3

objSizeMethod · 0.80
engine_cacheMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected