Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
strace results with and without jemalloc
// with jemalloc
$ strace ./lemirebenchmark
execve("./lemirebenchmark", ["./lemirebenchmark"], [/* 28 vars */]) = 0
brk(NULL) = 0x79d0000
openat(AT_FDCWD, "/usr/local/lib/libjemalloc.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\340b\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=4887824, ...}) = 0
mmap(NULL, 1113224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffaa020000
mmap(0xffffaa090000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x60000) = 0xffffaa090000
mmap(0xffffaa0b0000, 523400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffaa0b0000
close(3) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30650, ...}) = 0
mmap(NULL, 30650, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffffaa010000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\370\26\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1865264, ...}) = 0
mmap(NULL, 1594240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9e80000
mmap(0xffffa9ff0000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x160000) = 0xffffa9ff0000
close(3) = 0
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20Q\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=842280, ...}) = 0
mmap(NULL, 721544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9dc0000
mmap(0xffffa9e60000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0xffffa9e60000
close(3) = 0
openat(AT_FDCWD, "/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\320\275\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1057320, ...}) = 0
mmap(NULL, 1204728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9c90000
mprotect(0xffffa9d80000, 65536, PROT_NONE) = 0
mmap(0xffffa9d90000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf0000) = 0xffffa9d90000
mmap(0xffffa9db0000, 25080, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffffa9db0000
close(3) = 0
openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20i\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=184304, ...}) = 0
mmap(NULL, 213912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9c50000
mmap(0xffffa9c70000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0xffffa9c70000
close(3) = 0
openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\20\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=73984, ...}) = 0
mmap(NULL, 131296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9c20000
mmap(0xffffa9c30000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xffffa9c30000
close(3) = 0
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0 )\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=133776, ...}) = 0
mmap(NULL, 197688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffffa9be0000
mmap(0xffffa9c00000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0xffffa9c00000
close(3) = 0
mprotect(0xffffa9ff0000, 65536, PROT_READ) = 0
mprotect(0xffffa9c00000, 65536, PROT_READ) = 0
mprotect(0xffffa9c30000, 65536, PROT_READ) = 0
mprotect(0xffffa9c70000, 65536, PROT_READ) = 0
mprotect(0xffffa9e60000, 65536, PROT_READ) = 0
mprotect(0xffffa9d90000, 65536, PROT_READ) = 0
mprotect(0xffffaa090000, 65536, PROT_READ) = 0
mprotect(0x410000, 65536, PROT_READ) = 0
mprotect(0xffffaa170000, 65536, PROT_READ) = 0
munmap(0xffffaa010000, 30650) = 0
set_tid_address(0xffffaa185410) = 5223
set_robust_list(0xffffaa185420, 24) = 0
rt_sigaction(SIGRTMIN, {0xffffa9c563b4, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xffffa9c56494, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/etc/malloc.conf", 0xffffd9bebef8, 4096) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY|O_CLOEXEC) = 3
read(3, "0", 1) = 1
close(3) = 0
openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/enabled", O_RDONLY) = 3
read(3, "[always] madvise never\n", 24) = 23
close(3) = 0
mmap(NULL, 536870912, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xffff89be0000
munmap(0xffff89be0000, 536870912) = 0
mmap(NULL, 1073676288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xffff69bf0000
munmap(0xffff69bf0000, 373358592) = 0
munmap(0xffffa0000000, 163446784) = 0
brk(NULL) = 0x79d0000
mmap(NULL, 536870912, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xffff60000000
sched_getaffinity(5223, 128, [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]) = 128
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffaa010000
write(1, "create(): ", 10create(): ) = 10
write(1, " 12.358000 ms\n", 14 12.358000 ms
) = 14
write(1, "bitset_count(b1): ", 18bitset_count(b1): ) = 18
write(1, " 3.058000 ms\n", 13 3.058000 ms
) = 13
write(1, "iterate(b1): ", 13iterate(b1): ) = 13
write(1, " 4.903000 ms\n", 13 4.903000 ms
) = 13
write(1, "iterate2(b1): ", 14iterate2(b1): ) = 14
write(1, " 6.129000 ms\n", 13 6.129000 ms
) = 13
write(1, "iterate3(b1): ", 14iterate3(b1): ) = 14
write(1, " 4.664000 ms\n", 13 4.664000 ms
) = 13
write(1, "iterateb(b1): ", 14iterateb(b1): ) = 14
write(1, " 4.904000 ms\n", 13 4.904000 ms
) = 13
write(1, "iterate2b(b1): ", 15iterate2b(b1): ) = 15
write(1, " 5.993000 ms\n", 13 5.993000 ms
) = 13
write(1, "iterate3b(b1): ", 15iterate3b(b1): ) = 15
write(1, " 4.476000 ms\n", 13 4.476000 ms
) = 13
exit_group(0) = ?
+++ exited with 0 +++
/////////////////////
// without
/////////////////////
$ strace ./lemirebenchmark
execve("./lemirebenchmark", ["./lemirebenchmark"], [/* 27 vars */]) = 0
brk(NULL) = 0x8a60000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30650, ...}) = 0
mmap(NULL, 30650, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffff8be50000
close(3) = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\370\26\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1865264, ...}) = 0
mmap(NULL, 1594240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffff8bcc0000
mmap(0xffff8be30000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x160000) = 0xffff8be30000
close(3) = 0
mprotect(0xffff8be30000, 65536, PROT_READ) = 0
mprotect(0x410000, 65536, PROT_READ) = 0
mprotect(0xffff8bea0000, 65536, PROT_READ) = 0
munmap(0xffff8be50000, 30650) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8be50000
write(1, "create(): ", 10create(): ) = 10
brk(NULL) = 0x8a60000
brk(0x8a90000) = 0x8a90000
brk(NULL) = 0x8a90000
mmap(NULL, 393216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffff8bc60000
mremap(0xffff8bc60000, 393216, 786432, MREMAP_MAYMOVE) = 0xffff8bba0000
mremap(0xffff8bba0000, 786432, 1507328, MREMAP_MAYMOVE) = 0xffff8ba30000
mremap(0xffff8ba30000, 1507328, 2949120, MREMAP_MAYMOVE) = 0xffff8b760000
mremap(0xffff8b760000, 2949120, 5898240, MREMAP_MAYMOVE) = 0xffff8b1c0000
mremap(0xffff8b1c0000, 5898240, 11730944, MREMAP_MAYMOVE) = 0xffff8a690000
mremap(0xffff8a690000, 11730944, 23396352, MREMAP_MAYMOVE) = 0xffff89040000
munmap(0xffff89040000, 23396352) = 0
brk(NULL) = 0x8a90000
brk(0x8b10000) = 0x8b10000
brk(NULL) = 0x8b10000
brk(0x8b90000) = 0x8b90000
brk(NULL) = 0x8b90000
brk(0x8ca0000) = 0x8ca0000
brk(NULL) = 0x8ca0000
brk(0x8eb0000) = 0x8eb0000
brk(NULL) = 0x8eb0000
brk(0x92e0000) = 0x92e0000
brk(NULL) = 0x92e0000
brk(0x9b40000) = 0x9b40000
brk(NULL) = 0x9b40000
brk(0xabf0000) = 0xabf0000
write(1, " 23.155000 ms\n", 14 23.155000 ms
) = 14
write(1, "bitset_count(b1): ", 18bitset_count(b1): ) = 18
write(1, " 3.263000 ms\n", 13 3.263000 ms
) = 13
write(1, "iterate(b1): ", 13iterate(b1): ) = 13
write(1, " 5.233000 ms\n", 13 5.233000 ms
) = 13
write(1, "iterate2(b1): ", 14iterate2(b1): ) = 14
write(1, " 6.535000 ms\n", 13 6.535000 ms
) = 13
write(1, "iterate3(b1): ", 14iterate3(b1): ) = 14
write(1, " 4.976000 ms\n", 13 4.976000 ms
) = 13
write(1, "iterateb(b1): ", 14iterateb(b1): ) = 14
write(1, " 5.229000 ms\n", 13 5.229000 ms
) = 13
write(1, "iterate2b(b1): ", 15iterate2b(b1): ) = 15
write(1, " 6.198000 ms\n", 13 6.198000 ms
) = 13
write(1, "iterate3b(b1): ", 15iterate3b(b1): ) = 15
write(1, " 4.627000 ms\n", 13 4.627000 ms
) = 13
exit_group(0) = ?
+++ exited with 0 +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.