Skip to content

Commit 2d40c82

Browse files
committed
fix bugs and disable mrcProfiler test
1 parent 4b826ae commit 2d40c82

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

libCacheSim/bin/distUtil/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ set(distUtil_sources_c
99
)
1010
add_executable(distUtil ${distUtil_sources_c})
1111
target_link_libraries(distUtil ${all_modules} ${dependency_libs} utils_lib)
12-
install(TARGETS cachesim RUNTIME DESTINATION bin)
12+
install(TARGETS distUtil RUNTIME DESTINATION bin)

libCacheSim/cache/eviction/RandomLRU.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,15 @@ cache_t *RandomLRU_init(const common_cache_params_t ccache_params,
7575
(RandomLRU_params_t *)malloc(sizeof(RandomLRU_params_t));
7676
RandomLRU_params_t *params = (RandomLRU_params_t *)(cache->eviction_params);
7777
memset(params, 0, sizeof(RandomLRU_params_t));
78-
params->eviction_candidates =
79-
(cache_obj_t **)malloc(sizeof(cache_obj_t *) * params->n_samples);
8078

8179
RandomLRU_parse_params(cache, DEFAULT_CACHE_PARAMS);
8280
if (cache_specific_params != NULL) {
8381
RandomLRU_parse_params(cache, cache_specific_params);
8482
}
8583

84+
params->eviction_candidates =
85+
(cache_obj_t **)malloc(sizeof(cache_obj_t *) * params->n_samples);
86+
8687
snprintf(cache->cache_name, CACHE_NAME_ARRAY_LEN, "RandomLRU-%d",
8788
params->n_samples);
8889

@@ -94,7 +95,12 @@ cache_t *RandomLRU_init(const common_cache_params_t ccache_params,
9495
*
9596
* @param cache
9697
*/
97-
static void RandomLRU_free(cache_t *cache) { cache_struct_free(cache); }
98+
static void RandomLRU_free(cache_t *cache) {
99+
RandomLRU_params_t *params = (RandomLRU_params_t *)(cache->eviction_params);
100+
free(params->eviction_candidates);
101+
free(params);
102+
cache_struct_free(cache);
103+
}
98104

99105
/**
100106
* @brief this function is the user facing API

libCacheSim/traceAnalyzer/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set(traceAnalyzer_sources_cpp
99
utils/utils.cpp
1010
utils/utilsSys.cpp
1111

12-
experimental/
1312
accessPattern.cpp
1413
analyzer.cpp
1514
popularity.cpp

test/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ add_test_executable(testDataStructure test_dataStructure.c)
4040
add_test_executable(testUtils test_utils.c)
4141

4242
# Create C++ test executable (mrcProfiler test)
43-
add_test_executable(testMrcProfiler test_mrcProfiler.cpp)
44-
target_link_libraries(testMrcProfiler mrcProfiler_lib)
45-
target_link_options(testMrcProfiler PRIVATE "-Wl,--export-dynamic")
43+
# add_test_executable(testMrcProfiler test_mrcProfiler.cpp)
44+
# target_link_libraries(testMrcProfiler mrcProfiler_lib)
45+
# target_link_options(testMrcProfiler PRIVATE "-Wl,--export-dynamic")
4646

4747

4848

@@ -55,7 +55,7 @@ add_test(NAME testAdmissionAlgo COMMAND testAdmissionAlgo WORKING_DIRECTORY .)
5555
add_test(NAME testPrefetchAlgo COMMAND testPrefetchAlgo WORKING_DIRECTORY .)
5656
add_test(NAME testDataStructure COMMAND testDataStructure WORKING_DIRECTORY .)
5757
add_test(NAME testUtils COMMAND testUtils WORKING_DIRECTORY .)
58-
add_test(NAME testMrcProfiler COMMAND testMrcProfiler WORKING_DIRECTORY .)
58+
# add_test(NAME testMrcProfiler COMMAND testMrcProfiler WORKING_DIRECTORY .)
5959

6060
# if (ENABLE_GLCACHE)
6161
# add_executable(testGLCache test_glcache.c)

0 commit comments

Comments
 (0)