Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libCacheSim/cache/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ cache_t *create_cache_internal(const char *const cache_alg_name,
return cache;
}

cache_t *create_cache(const char *const cache_alg_name,
common_cache_params_t cc_params, void *specific_params) {
cache_t *create_cache_using_plugin(const char *const cache_alg_name,
common_cache_params_t cc_params,
void *specific_params) {
cache_t *cache =
create_cache_internal(cache_alg_name, cc_params, specific_params);
if (cache == NULL) {
Expand Down
9 changes: 5 additions & 4 deletions libCacheSim/include/libCacheSim/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ extern "C" {
* @param cache_specific_params Algorithm-specific parameters (can be NULL)
* @return Pointer to initialized cache handler, or NULL on failure
*/
cache_t *create_cache(const char *const cache_alg_name,
common_cache_params_t cc_params,
void *cache_specific_params);
cache_t *create_cache_using_plugin(const char *const cache_alg_name,
common_cache_params_t cc_params,
void *cache_specific_params);

/**
* @brief Internal cache creation function
*
* Similar to create_cache() but for internal use within libCacheSim.
* Similar to create_cache_using_plugin() but for internal use within
* libCacheSim.
*
* @param cache_alg_name Name of the cache replacement algorithm (case
* sensitive)
Expand Down
3 changes: 2 additions & 1 deletion libCacheSim/mrcProfiler/mrcProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ void mrcProfiler::MRCProfilerMINISIM::run() {
.default_ttl = 0,
.hashpower = 20,
.consider_obj_metadata = false};
caches[i] = create_cache(params_.cache_algorithm_str, cc_params, nullptr);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can directly use create_cache_internal here

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm

caches[i] = create_cache_using_plugin(params_.cache_algorithm_str,
cc_params, nullptr);
}
result = simulate_with_multi_caches(
reader_, caches, mrc_size_vec.size(), NULL, 0, 0,
Expand Down
Loading