Skip to content

Commit 31fc1a9

Browse files
authored
Fix: rename create_cache in plugin (#259)
1 parent c9f041e commit 31fc1a9

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

libCacheSim/cache/plugin.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ cache_t *create_cache_internal(const char *const cache_alg_name,
9090
return cache;
9191
}
9292

93-
cache_t *create_cache(const char *const cache_alg_name,
94-
common_cache_params_t cc_params, void *specific_params) {
93+
cache_t *create_cache_using_plugin(const char *const cache_alg_name,
94+
common_cache_params_t cc_params,
95+
void *specific_params) {
9596
cache_t *cache =
9697
create_cache_internal(cache_alg_name, cc_params, specific_params);
9798
if (cache == NULL) {

libCacheSim/include/libCacheSim/plugin.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ extern "C" {
4949
* @param cache_specific_params Algorithm-specific parameters (can be NULL)
5050
* @return Pointer to initialized cache handler, or NULL on failure
5151
*/
52-
cache_t *create_cache(const char *const cache_alg_name,
53-
common_cache_params_t cc_params,
54-
void *cache_specific_params);
52+
cache_t *create_cache_using_plugin(const char *const cache_alg_name,
53+
common_cache_params_t cc_params,
54+
void *cache_specific_params);
5555

5656
/**
5757
* @brief Internal cache creation function
5858
*
59-
* Similar to create_cache() but for internal use within libCacheSim.
59+
* Similar to create_cache_using_plugin() but for internal use within
60+
* libCacheSim.
6061
*
6162
* @param cache_alg_name Name of the cache replacement algorithm (case
6263
* sensitive)

libCacheSim/mrcProfiler/mrcProfiler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ void mrcProfiler::MRCProfilerMINISIM::run() {
305305
.default_ttl = 0,
306306
.hashpower = 20,
307307
.consider_obj_metadata = false};
308-
caches[i] = create_cache(params_.cache_algorithm_str, cc_params, nullptr);
308+
caches[i] = create_cache_using_plugin(params_.cache_algorithm_str,
309+
cc_params, nullptr);
309310
}
310311
result = simulate_with_multi_caches(
311312
reader_, caches, mrc_size_vec.size(), NULL, 0, 0,

0 commit comments

Comments
 (0)