Open fengggli opened 5 years ago
call stack
./options.c: .oval = MEM_MALLOC,
Binary file ./client.o matches
Binary file ./backend.o matches
Binary file ./libfio.o matches
Binary file ./steadystate.o matches
Binary file ./rate-submit.o matches
Binary file ./blktrace.o matches
Binary file ./time.o matches
./thread_options.h: MEM_MALLOC = 0, /* ordinary malloc */
4 attribute(Constructor can be useful)
https://stackoverflow.com/a/4586534/6261848 use --wrap in gcc
https://www.apriorit.com/dev-blog/537-using-constructor-attribute-with-ld-preload
https://www.tldp.org/HOWTO/pdf/C++-dlopen.pdf
https://stackoverflow.com/a/43005999
(py36) lifen@sievert(:):~/Workspace/vagrantvm/vagrant-ubuntu18-spdk1810/comanche/build$ltrace ./src/fuse/ustack/unit_test/test-preload
__libc_start_main(0x4005a0, 1, 0x7ffe6d64cce8, 0x400730 <unfinished ...>
open64("foobar.dat", 65, 0700) = 3
close(3) = 0
__fprintf_chk(0x7f4ad696e540, 1, 0x4007d4, 0x4007ce[LOG]:done!
) = 21
+++ exited (status 0) +++
I checked the client side system call traces, all mmap are called without huge_tlb, I could intercept the mmap call, if it contains huge_tlb, use special memory, other wise..
get performance of simple workload first
TODO
File operations: remove file append to file
Capture system call
systemutils
fio test
Intercept