Skip to content

Commit ff2d10d

Browse files
committed
fix format and cmake default level
1 parent 4dfd95d commit ff2d10d

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif()
5353

5454
string(TOLOWER "${LOG_LEVEL}" LOG_LEVEL_LOWER)
5555

56-
if(LOG_LEVEL_LOWER STREQUAL "")
56+
if(LOG_LEVEL_LOWER STREQUAL "none")
5757
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
5858
message(STATUS "LOG_LEVEL is not set, use DEBUG as default for debug build")
5959
add_compile_definitions(LOGLEVEL=6)

libCacheSim/cache/eviction/GLCache/GLCache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static cache_obj_t *GLCache_insert(cache_t *cache, const request_t *req) {
398398
seg = allocate_new_seg(cache, bucket->bucket_id);
399399
append_seg_to_bucket(params, bucket, seg);
400400
VERBOSE("%lu allocate new seg, %d in use seg\n", cache->n_req,
401-
params->n_in_use_segs);
401+
params->n_in_use_segs);
402402
}
403403

404404
cache_obj_t *cache_obj = &seg->objs[seg->n_obj];

libCacheSim/cache/eviction/GLCache/eviction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void GLCache_merge_segs(cache_t *cache, bucket_t *bucket, segment_t **segs) {
142142
// different from clean_one_seg because this function also updates cache state
143143
int evict_one_seg(cache_t *cache, segment_t *seg) {
144144
VERBOSE("req %lu, evict one seg id %d occupied size %lu/%lu\n", cache->n_req,
145-
seg->seg_id, cache->occupied_byte, cache->cache_size);
145+
seg->seg_id, cache->occupied_byte, cache->cache_size);
146146
GLCache_params_t *params = cache->eviction_params;
147147
bucket_t *bucket = &params->buckets[seg->bucket_id];
148148

libCacheSim/cache/eviction/LFU.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static cache_obj_t *LFU_find(cache_t *cache, const request_t *req,
193193
new_node->freq = cache_obj->lfu.freq;
194194
g_hash_table_insert(params->freq_map, new_key, new_node);
195195
VERBOSE("allocate new %ld %d %p %p\n", new_node->freq, new_node->n_obj,
196-
new_node->first_obj, new_node->last_obj);
196+
new_node->first_obj, new_node->last_obj);
197197
} else {
198198
// it could be new_node is empty
199199
DEBUG_ASSERT(new_node->freq == cache_obj->lfu.freq);

libCacheSim/cache/eviction/LFUDA.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static cache_obj_t *LFUDA_find(cache_t *cache, const request_t *req,
182182
new_node->freq = cache_obj->lfu.freq;
183183
g_hash_table_insert(params->freq_map, new_key, new_node);
184184
VERBOSE("allocate new %ld %d %p %p\n", new_node->freq, new_node->n_obj,
185-
new_node->first_obj, new_node->last_obj);
185+
new_node->first_obj, new_node->last_obj);
186186
} else {
187187
// it could be new_node is empty
188188
DEBUG_ASSERT(new_node->freq == cache_obj->lfu.freq);

libCacheSim/cache/eviction/LeCaR.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static inline void update_LFU_min_freq(LeCaR_params_t *params) {
653653
}
654654
}
655655
VERBOSE("update LFU min freq from %ld to %ld\n", old_min_freq,
656-
params->min_freq);
656+
params->min_freq);
657657
// if the object is the only object in the cache, we may have min_freq == 1
658658
DEBUG_ASSERT(params->min_freq > old_min_freq ||
659659
params->q_head == params->q_tail);
@@ -683,7 +683,7 @@ static inline void remove_obj_from_freq_node(LeCaR_params_t *params,
683683
DEBUG_ASSERT(freq_node->freq == cache_obj->LeCaR.freq);
684684
DEBUG_ASSERT(freq_node->n_obj > 0);
685685
VERBOSE("remove object from freq node %p (freq %ld, %u obj)\n", freq_node,
686-
freq_node->freq, freq_node->n_obj);
686+
freq_node->freq, freq_node->n_obj);
687687
freq_node->n_obj--;
688688

689689
if (cache_obj == freq_node->first_obj) {

libCacheSim/traceReader/generalReader/txt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ int txt_read_one_req(reader_t *const reader, request_t *const req) {
1111
size_t *buf_size_ptr = &reader->line_buf_size;
1212
ssize_t read_size = getline(buf_ptr, buf_size_ptr, reader->file);
1313
VERBOSE("read \"%s\", first char %d, read size %zu, curr pos %zu\n",
14-
reader->line_buf, reader->line_buf[0], read_size,
15-
ftell(reader->file));
14+
reader->line_buf, reader->line_buf[0], read_size,
15+
ftell(reader->file));
1616

1717
while (read_size == 1 && reader->line_buf[0] == '\n') {
1818
// empty line

libCacheSim/traceReader/reader.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ int read_one_req(reader_t *const reader, request_t *const req) {
315315
reader->sampler = NULL;
316316
while (!sampler->sample(sampler, req)) {
317317
VERBOSE("skip one req: time %lu, obj_id %lu, size %lu at offset %zu\n",
318-
req->clock_time, req->obj_id, req->obj_size, offset_before_read);
318+
req->clock_time, req->obj_id, req->obj_size, offset_before_read);
319319
if (reader->read_direction == READ_FORWARD) {
320320
status = read_one_req(reader, req);
321321
} else {
@@ -334,7 +334,7 @@ int read_one_req(reader_t *const reader, request_t *const req) {
334334
}
335335

336336
VERBOSE("read one req: time %lu, obj_id %lu, size %lu at offset %zu\n",
337-
req->clock_time, req->obj_id, req->obj_size, offset_before_read);
337+
req->clock_time, req->obj_id, req->obj_size, offset_before_read);
338338

339339
return status;
340340
}

0 commit comments

Comments
 (0)