You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/memory_usage_profiling.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Profiling Memory Usage in CacheSim with Massif
2
2
3
3
## 1. Introduction
4
-
This guide explains how to analyze memory usage in the `cachesim` project using Valgrind's **massif** tool and identifies critical memory overhead areas as potential optimization targets. The workflow consists of the following steps:
4
+
This guide explains how to analyze memory usage in the `cachesim` project using Valgrind's **massif** tool and identifies critical memory overhead areas as potential optimization targets. The workflow consists of the following steps:
5
5
6
6
- Heap memory profiling
7
7
- Identifying memory hotspots
@@ -15,8 +15,8 @@ This guide explains how to analyze memory usage in the `cachesim` project using
15
15
```sh
16
16
# Compile with debug symbols
17
17
mkdir _build &&cd _build
18
-
cmake .. -DCMAKE_BUILD_TYPE=Debug
19
-
make -j
18
+
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug
19
+
ninja
20
20
```
21
21
22
22
2. Run `massif` for a specific algorithm (e.g., S3-FIFO):
@@ -38,7 +38,7 @@ The generated report primarily includes a bar chart of memory usage (with instru
| ->24.74% (134,217,728B) 0x406FFD: main (main.c:18)
94
-
|
94
+
|
95
95
->00.84% (4,541,568B) in 1+ places, all below ms_print's threshold (01.00%)
96
96
```
97
97
@@ -105,7 +105,7 @@ The above report indicates that the memory usage of S3-FIFO remains nearly const
105
105
106
106
### 3.1. Memory Usage of Various Algorithms
107
107
108
-
We conducted tests using the `wiki_2019t` workload (available at [CMU's dataset repository](https://ftp.pdl.cmu.edu/pub/datasets/twemcacheWorkload/cacheDatasets/wiki/)) to evaluate the memory usage of various algorithms with a cache size of 1GB.
108
+
We conducted tests using the `wiki_2019t` workload (available at [CMU's dataset repository](https://ftp.pdl.cmu.edu/pub/datasets/twemcacheWorkload/cacheDatasets/wiki/)) to evaluate the memory usage of various algorithms with a cache size of 1GB.
0 commit comments