Skip to content

Commit 51f4bdf

Browse files
shermanjlimSherman Jun Hong Limhaochengxia
authored
[Bugfix] Enable belady for lcs trace (#292)
Co-authored-by: Sherman Jun Hong Lim <[email protected]> Co-authored-by: Percy <[email protected]>
1 parent 91f703a commit 51f4bdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libCacheSim/bin/cachesim/cache_init.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ static inline cache_t *create_cache(const char *trace_path,
125125
cache = WTinyLFU_init(cc_params, eviction_params);
126126
}
127127
}
128-
} else if (strcasecmp(eviction_algo, "belady") == 0 &&
129-
strcasestr(trace_path, "lcs") == NULL) {
130-
if (strcasestr(trace_path, "oracleGeneral") == NULL) {
128+
} else if (strcasecmp(eviction_algo, "belady") == 0) {
129+
if (strcasestr(trace_path, "oracleGeneral") == NULL &&
130+
strcasestr(trace_path, "lcs") == NULL) {
131131
WARN("belady is only supported for oracleGeneral and lcs trace\n");
132132
WARN("to convert a trace to lcs format\n");
133133
WARN("./bin/traceConv input_trace trace_format output_trace\n");

0 commit comments

Comments
 (0)