https://github.com/lovasko/ctfmemusage
CTF Memory Usage Comparison
https://github.com/lovasko/ctfmemusage
Last synced: 8 months ago
JSON representation
CTF Memory Usage Comparison
- Host: GitHub
- URL: https://github.com/lovasko/ctfmemusage
- Owner: lovasko
- License: bsd-2-clause
- Created: 2015-01-18T19:48:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T16:22:28.000Z (almost 11 years ago)
- Last Synced: 2024-12-25T11:32:48.262Z (over 1 year ago)
- Language: C
- Size: 148 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ctfmemusage
Compute and display the memory usage of the CTF data set, the `libbsdctf` and
comparisong to the DWARF data set.
## Build
```
$ ninja
```
### Dependencies
* libbsdctf
* libelf
## Usage
* `-h` print help message
* `-l` insepct the library storage/memory efficiency
* `-d` inspect the CTF/DWARF comparison
* `-r` print ratio
* `-s` when used in combination with `-r` will print only the ratio number
## Run
Inspect general library implementation and DWARF comparison:
```
$ ctfmemusage -dlr /boot/kernel/kernel
CTF memory vs. CTF storage
--------------------------
Memory usage: 6485904 bytes
Storage usage: 3144954 bytes
Ratio: 2.062
DWARF storage vs. CTF storage
-----------------------------
DWARF: 34168436 bytes
CTF: 3144954 bytes
Ratio: 10.865
```
Compute average storage inflation by the library (results may vary depending on
your system):
```
$ find /boot/kernel -name '*.symbols' -exec ctfmemusage -lrs {} \; | awk
‘{+=$1}END{print s/NR}'
2.67788
```
## Author
Daniel Lovasko (lovasko@freebsd.org)