OmniSciDB
a5dc49c757
|
#include <CodeCacheAccessor.h>
Public Member Functions | |
CodeCacheAccessor (EvictionMetricType eviction_metric_type, size_t max_cache_size, std::string name) | |
CodeCacheVal< CompilationContext > | get_value (const CodeCacheKey &key) |
bool | put (const CodeCacheKey &key, CodeCacheVal< CompilationContext > &value) |
CodeCacheVal < CompilationContext > * | get_or_wait (const CodeCacheKey &key) |
void | reset (const CodeCacheKey &key, CodeCacheVal< CompilationContext > value) |
void | erase (const CodeCacheKey &key) |
void | clear () |
size_t | computeNumEntriesToEvict (const float fraction) |
void | evictEntries (const size_t n) |
size_t | getCacheSize () |
void | resetCache (size_t new_max_size) |
CodeCacheMetric | getCodeCacheMetric () |
Private Attributes | |
CodeCache< CompilationContext > | code_cache_ |
EvictionMetricType const | eviction_metric_type_ |
int64_t | get_count_ |
int64_t | found_count_ |
int64_t | put_count_ |
int64_t | ignore_count_ |
int64_t | overwrite_count_ |
int64_t | evict_count_ |
const std::string | name_ |
std::mutex | code_cache_mutex_ |
std::condition_variable | compilation_cv_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, CodeCacheAccessor &c) |
Definition at line 38 of file CodeCacheAccessor.h.
|
inline |
Definition at line 40 of file CodeCacheAccessor.h.
References EntryCount, CodeCacheAccessor< CompilationContext >::eviction_metric_type_, logger::INFO, LOG, and CodeCacheAccessor< CompilationContext >::name_.
void CodeCacheAccessor< CompilationContext >::clear | ( | ) |
Definition at line 113 of file CodeCacheAccessor.cpp.
|
inline |
Definition at line 73 of file CodeCacheAccessor.h.
References CodeCacheAccessor< CompilationContext >::code_cache_, and CodeCacheAccessor< CompilationContext >::code_cache_mutex_.
void CodeCacheAccessor< CompilationContext >::erase | ( | const CodeCacheKey & | key | ) |
Definition at line 106 of file CodeCacheAccessor.cpp.
|
inline |
Definition at line 78 of file CodeCacheAccessor.h.
References CodeCacheAccessor< CompilationContext >::code_cache_, CodeCacheAccessor< CompilationContext >::code_cache_mutex_, and CodeCacheAccessor< CompilationContext >::evict_count_.
CodeCacheVal< CompilationContext > * CodeCacheAccessor< CompilationContext >::get_or_wait | ( | const CodeCacheKey & | key | ) |
Definition at line 59 of file CodeCacheAccessor.cpp.
CodeCacheVal< CompilationContext > CodeCacheAccessor< CompilationContext >::get_value | ( | const CodeCacheKey & | key | ) |
Definition at line 21 of file CodeCacheAccessor.cpp.
References VLOG.
|
inline |
Definition at line 93 of file CodeCacheAccessor.h.
References CodeCacheAccessor< CompilationContext >::code_cache_, and CodeCacheAccessor< CompilationContext >::code_cache_mutex_.
|
inline |
Definition at line 104 of file CodeCacheAccessor.h.
References CodeCacheAccessor< CompilationContext >::code_cache_mutex_, CodeCacheAccessor< CompilationContext >::evict_count_, CodeCacheAccessor< CompilationContext >::found_count_, CodeCacheAccessor< CompilationContext >::get_count_, CodeCacheAccessor< CompilationContext >::ignore_count_, CodeCacheAccessor< CompilationContext >::overwrite_count_, and CodeCacheAccessor< CompilationContext >::put_count_.
bool CodeCacheAccessor< CompilationContext >::put | ( | const CodeCacheKey & | key, |
CodeCacheVal< CompilationContext > & | value | ||
) |
Definition at line 35 of file CodeCacheAccessor.cpp.
References LOG, VLOG, and logger::WARNING.
void CodeCacheAccessor< CompilationContext >::reset | ( | const CodeCacheKey & | key, |
CodeCacheVal< CompilationContext > | value | ||
) |
Definition at line 94 of file CodeCacheAccessor.cpp.
References CHECK, and run_benchmark_import::result.
|
inline |
Definition at line 98 of file CodeCacheAccessor.h.
References CHECK, CodeCacheAccessor< CompilationContext >::code_cache_, CodeCacheAccessor< CompilationContext >::code_cache_mutex_, CodeCacheAccessor< CompilationContext >::eviction_metric_type_, and g_is_test_env.
|
friend |
Definition at line 84 of file CodeCacheAccessor.h.
|
private |
Definition at line 115 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::computeNumEntriesToEvict(), CodeCacheAccessor< CompilationContext >::evictEntries(), CodeCacheAccessor< CompilationContext >::getCacheSize(), and CodeCacheAccessor< CompilationContext >::resetCache().
|
private |
Definition at line 123 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::computeNumEntriesToEvict(), CodeCacheAccessor< CompilationContext >::evictEntries(), CodeCacheAccessor< CompilationContext >::getCacheSize(), CodeCacheAccessor< CompilationContext >::getCodeCacheMetric(), and CodeCacheAccessor< CompilationContext >::resetCache().
|
private |
Definition at line 126 of file CodeCacheAccessor.h.
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::evictEntries(), and CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().
|
private |
Definition at line 116 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::CodeCacheAccessor(), and CodeCacheAccessor< CompilationContext >::resetCache().
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().
|
private |
Definition at line 121 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::CodeCacheAccessor().
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().
|
private |
Definition at line 118 of file CodeCacheAccessor.h.
Referenced by CodeCacheAccessor< CompilationContext >::getCodeCacheMetric().