├── .cproject
├── .gitignore
├── .project
├── .pydevproject
├── LICENSE
├── Makefile.am
├── NOTES
├── README.md
├── bootstrap
├── configure.ac
├── eval.py
├── m4
├── acx_pthread.m4
├── ax_cxx_compile_stdcxx_11.m4
├── boost.m4
├── libtool.m4
├── ltoptions.m4
├── ltsugar.m4
├── ltversion.m4
└── lt~obsolete.m4
├── misc
├── cowbt
│ ├── cow_pbtest.cpp
│ ├── libpm.cpp
│ ├── libpm.h
│ └── plist.h
├── linux-examples
│ ├── .gitignore
│ ├── FAQ.txt
│ ├── LICENSE
│ ├── LINUX_PMEM_API.txt
│ ├── Makefile.inc
│ ├── README
│ ├── basic
│ │ ├── .gitignore
│ │ ├── README
│ │ ├── basic.c
│ │ └── basictest.pass
│ ├── binarytree
│ │ ├── .gitignore
│ │ ├── README
│ │ ├── freqtest.pass
│ │ ├── tree.c
│ │ ├── tree.h
│ │ ├── tree_free.c
│ │ ├── tree_insert.c
│ │ ├── tree_walk.c
│ │ └── tree_wordfreq.c
│ ├── icount
│ │ ├── .gitignore
│ │ ├── README
│ │ ├── icount.c
│ │ ├── icount.h
│ │ ├── icount_test.c
│ │ └── icount_test.pass
│ ├── libpm.cpp
│ ├── libpm.h
│ ├── libpmem
│ │ ├── .gitignore
│ │ ├── LIBPMEM_API.txt
│ │ ├── README
│ │ ├── pmem.c
│ │ ├── pmem.h
│ │ ├── pmem.map
│ │ ├── pmem_cl.c
│ │ ├── pmem_fit.c
│ │ ├── pmem_inline.h
│ │ └── pmem_msync.c
│ ├── libpmemalloc
│ │ ├── .gitignore
│ │ ├── PMEMALLOC_API.txt
│ │ ├── README
│ │ ├── design.txt
│ │ ├── pmemalloc.c
│ │ ├── pmemalloc.h
│ │ ├── pmemalloc.map
│ │ ├── pmemalloc_check.c
│ │ ├── pmemalloc_test1.c
│ │ ├── pmemalloc_test2.c
│ │ └── pmemalloctest.pass
│ ├── pdb.cpp
│ ├── plist.cpp
│ ├── plist.h
│ ├── pmem_use.cpp
│ ├── ptreap.cpp
│ ├── ptreap.h
│ ├── ptree.cpp
│ ├── ptree.h
│ ├── trivial
│ │ ├── .gitignore
│ │ ├── README
│ │ ├── trivial.c
│ │ └── trivialtest.pass
│ └── util
│ │ ├── README
│ │ ├── util.c
│ │ └── util.h
├── micro
│ └── io_test.cpp
├── mmalloc
│ ├── COPYING.LIB
│ ├── ChangeLog
│ ├── MAINTAINERS
│ ├── TODO
│ ├── acinclude.m4
│ ├── attach.c
│ ├── configure.in
│ ├── detach.c
│ ├── keys.c
│ ├── mcalloc.c
│ ├── mfree.c
│ ├── mm.c
│ ├── mmalloc.c
│ ├── mmalloc.h
│ ├── mmalloc.info
│ ├── mmalloc.texi
│ ├── mmap-sup.c
│ ├── mmcheck.c
│ ├── mmemalign.c
│ ├── mmprivate.h
│ ├── mmstats.c
│ ├── mmtrace.awk
│ ├── mmtrace.c
│ ├── mrealloc.c
│ ├── mvalloc.c
│ └── sbrk-sup.c
├── pcommit
│ └── pm_helper.c
├── pmem
│ ├── libpm.cpp
│ ├── libpm.h
│ ├── pmem_check.cpp
│ └── test_pmem.cpp
├── test
│ ├── eclipse-cpp-google-style.xml
│ ├── fields.cpp
│ ├── flush_test.cpp
│ ├── mmaptest.cpp
│ ├── msynctest.cpp
│ ├── serialize.cpp
│ ├── slog.cpp
│ ├── time.cpp
│ └── zipf.cpp
└── tpcc
│ └── sqlitedriver.py
├── results
├── btree
│ ├── 64
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 128
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 256
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 512
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 1024
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 2048
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 4096
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 8192
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ └── 16384
│ │ ├── lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ └── wal
│ │ ├── balanced
│ │ └── 320
│ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ └── 320
│ │ │ └── performance.csv
│ │ ├── read-only
│ │ └── 320
│ │ │ └── performance.csv
│ │ └── write-heavy
│ │ └── 320
│ │ └── performance.csv
├── ise
│ ├── 1
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 10
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 100
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ ├── 1000
│ │ ├── lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── sp
│ │ │ ├── balanced
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ │ └── 320
│ │ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── wal
│ │ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ └── 10000
│ │ ├── lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ ├── sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── performance.csv
│ │ └── wal
│ │ ├── balanced
│ │ └── 320
│ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ └── 320
│ │ │ └── performance.csv
│ │ ├── read-only
│ │ └── 320
│ │ │ └── performance.csv
│ │ └── write-heavy
│ │ └── 320
│ │ └── performance.csv
├── nvm_bw
│ ├── random
│ │ └── bw.csv
│ └── sequential
│ │ └── bw.csv
├── tpcc
│ ├── nvm
│ │ └── nvm.csv
│ ├── performance
│ │ ├── lsm
│ │ │ └── performance.csv
│ │ ├── opt_lsm
│ │ │ └── performance.csv
│ │ ├── opt_sp
│ │ │ └── performance.csv
│ │ ├── opt_wal
│ │ │ └── performance.csv
│ │ ├── sp
│ │ │ └── performance.csv
│ │ └── wal
│ │ │ └── performance.csv
│ ├── recovery
│ │ ├── lsm
│ │ │ └── recovery.csv
│ │ ├── opt_lsm
│ │ │ └── recovery.csv
│ │ ├── opt_sp
│ │ │ └── recovery.csv
│ │ ├── opt_wal
│ │ │ └── recovery.csv
│ │ ├── sp
│ │ │ └── recovery.csv
│ │ └── wal
│ │ │ └── recovery.csv
│ └── storage
│ │ └── storage.csv
└── ycsb
│ ├── abs_stack
│ ├── ycsb-stack-balanced-320.pdf
│ ├── ycsb-stack-read-heavy-320.pdf
│ ├── ycsb-stack-read-only-320.pdf
│ └── ycsb-stack-write-heavy-320.pdf
│ ├── nvm
│ ├── lsm
│ │ ├── balanced
│ │ │ └── nvm.csv
│ │ ├── read-heavy
│ │ │ └── nvm.csv
│ │ ├── read-only
│ │ │ └── nvm.csv
│ │ └── write-heavy
│ │ │ └── nvm.csv
│ ├── opt_lsm
│ │ ├── balanced
│ │ │ └── nvm.csv
│ │ ├── read-heavy
│ │ │ └── nvm.csv
│ │ ├── read-only
│ │ │ └── nvm.csv
│ │ └── write-heavy
│ │ │ └── nvm.csv
│ ├── opt_sp
│ │ ├── balanced
│ │ │ └── nvm.csv
│ │ ├── read-heavy
│ │ │ └── nvm.csv
│ │ ├── read-only
│ │ │ └── nvm.csv
│ │ └── write-heavy
│ │ │ └── nvm.csv
│ ├── opt_wal
│ │ ├── balanced
│ │ │ └── nvm.csv
│ │ ├── read-heavy
│ │ │ └── nvm.csv
│ │ ├── read-only
│ │ │ └── nvm.csv
│ │ └── write-heavy
│ │ │ └── nvm.csv
│ ├── sp
│ │ ├── balanced
│ │ │ └── nvm.csv
│ │ ├── read-heavy
│ │ │ └── nvm.csv
│ │ ├── read-only
│ │ │ └── nvm.csv
│ │ └── write-heavy
│ │ │ └── nvm.csv
│ └── wal
│ │ ├── balanced
│ │ └── nvm.csv
│ │ ├── read-heavy
│ │ └── nvm.csv
│ │ ├── read-only
│ │ └── nvm.csv
│ │ └── write-heavy
│ │ └── nvm.csv
│ ├── performance
│ ├── lsm
│ │ ├── balanced
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ ├── 160
│ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ └── performance.csv
│ ├── opt_lsm
│ │ ├── balanced
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ ├── 160
│ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ └── performance.csv
│ ├── opt_sp
│ │ ├── balanced
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ ├── 160
│ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ └── performance.csv
│ ├── opt_wal
│ │ ├── balanced
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ ├── 160
│ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ └── performance.csv
│ ├── sp
│ │ ├── balanced
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ ├── read-only
│ │ │ ├── 160
│ │ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ │ └── performance.csv
│ │ └── write-heavy
│ │ │ ├── 160
│ │ │ └── performance.csv
│ │ │ ├── 320
│ │ │ └── performance.csv
│ │ │ └── 1280
│ │ │ └── performance.csv
│ └── wal
│ │ ├── balanced
│ │ ├── 160
│ │ │ └── performance.csv
│ │ ├── 320
│ │ │ └── performance.csv
│ │ └── 1280
│ │ │ └── performance.csv
│ │ ├── read-heavy
│ │ ├── 160
│ │ │ └── performance.csv
│ │ ├── 320
│ │ │ └── performance.csv
│ │ └── 1280
│ │ │ └── performance.csv
│ │ ├── read-only
│ │ ├── 160
│ │ │ └── performance.csv
│ │ ├── 320
│ │ │ └── performance.csv
│ │ └── 1280
│ │ │ └── performance.csv
│ │ └── write-heavy
│ │ ├── 160
│ │ └── performance.csv
│ │ ├── 320
│ │ └── performance.csv
│ │ └── 1280
│ │ └── performance.csv
│ ├── recovery
│ ├── lsm
│ │ └── recovery.csv
│ ├── opt_lsm
│ │ └── recovery.csv
│ ├── opt_sp
│ │ └── recovery.csv
│ ├── opt_wal
│ │ └── recovery.csv
│ ├── sp
│ │ └── recovery.csv
│ └── wal
│ │ └── recovery.csv
│ ├── stack
│ ├── lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── stack.csv
│ ├── opt_lsm
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── stack.csv
│ ├── opt_sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── stack.csv
│ ├── opt_wal
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── stack.csv
│ ├── sp
│ │ ├── balanced
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ ├── read-only
│ │ │ └── 320
│ │ │ │ └── stack.csv
│ │ └── write-heavy
│ │ │ └── 320
│ │ │ └── stack.csv
│ └── wal
│ │ ├── balanced
│ │ └── 320
│ │ │ └── stack.csv
│ │ ├── read-heavy
│ │ └── 320
│ │ │ └── stack.csv
│ │ ├── read-only
│ │ └── 320
│ │ │ └── stack.csv
│ │ └── write-heavy
│ │ └── 320
│ │ └── stack.csv
│ └── storage
│ └── storage.csv
├── src
├── Makefile.am
├── clibpm.cpp
├── common
│ ├── benchmark.h
│ ├── clibpm.h
│ ├── config.h
│ ├── coordinator.h
│ ├── cow_pbtree.h
│ ├── database.h
│ ├── engine.h
│ ├── engine_api.h
│ ├── field.h
│ ├── libpm.h
│ ├── lock_manager.h
│ ├── logger.h
│ ├── lsm_engine.h
│ ├── opt_lsm_engine.h
│ ├── opt_sp_engine.h
│ ├── opt_wal_engine.h
│ ├── pbtree.h
│ ├── plist.h
│ ├── ptreap.h
│ ├── ptree.h
│ ├── record.h
│ ├── schema.h
│ ├── serializer.h
│ ├── sp_engine.h
│ ├── statement.h
│ ├── status.h
│ ├── storage.h
│ ├── table.h
│ ├── table_index.h
│ ├── test_benchmark.h
│ ├── timer.h
│ ├── tpcc_benchmark.h
│ ├── transaction.h
│ ├── utils.h
│ ├── wal_engine.h
│ └── ycsb_benchmark.h
├── libpm.cpp
├── lsm_engine.cpp
├── main.cpp
├── opt_lsm_engine.cpp
├── opt_sp_engine.cpp
├── opt_wal_engine.cpp
├── pmem_check.cpp
├── run.sh
├── sp_engine.cpp
├── test_benchmark.cpp
├── tpcc_benchmark.cpp
├── utils.cpp
├── wal_engine.cpp
├── wal_engine_fs.cpp
└── ycsb_benchmark.cpp
└── test
├── Makefile.am
├── test_pbtree.cpp
├── test_plist.cpp
├── test_pmem.cpp
└── test_ptreap.cpp
/.gitignore:
--------------------------------------------------------------------------------
1 | # Autotools
2 | Makefile
3 | Makefile.in
4 | configure
5 | *.o
6 | *~
7 | config.*
8 | config-h.in
9 | libtool
10 | .deps
11 | aclocal.m4
12 | autom4te.cache
13 | autom4te.cache/*
14 | stamp-h1
15 | aux-scripts
16 | #*#
17 | #.#*
18 | depcomp
19 | install-sh
20 | libtool
21 | ltmain.sh
22 | missing
23 | stamp-h*
24 |
25 | # Build files
26 | build
27 | build/*
28 | *.o
29 | *.sym
30 | *.a
31 | *.la
32 | *.out
33 | *.pyc
34 | *core
35 | *.db
36 | config
37 | nstore
38 | pmem_check
39 |
40 | # Log/Tmp files
41 | log*
42 | *.log
43 | *tmp
44 | perf.*
45 | GPATH
46 | GTAGS
47 | GRTAGS
48 |
49 | # Editor
50 | .settings/*
51 |
52 | bin/*
53 | zfile
54 |
55 | # Plots
56 | results/*.pdf
57 | /Debug
58 | misc/linux-examples/*
59 |
60 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | n-store
4 |
5 |
6 |
7 |
8 |
9 | org.python.pydev.PyDevBuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
15 | clean,full,incremental,
16 |
17 |
18 |
19 |
20 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
21 | full,incremental,
22 |
23 |
24 |
25 |
26 |
27 | org.eclipse.cdt.core.cnature
28 | org.eclipse.cdt.core.ccnature
29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
31 | org.python.pydev.pythonNature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.pydevproject:
--------------------------------------------------------------------------------
1 |
2 |
3 | Default
4 | python 2.7
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2014-16, Carnegie Mellon University Database Group
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Makefile.am -- Process this file with automake to produce Makefile.in
2 | AUTOMAKE_OPTIONS = foreign
3 | ACLOCAL_AMFLAGS = -I m4
4 |
5 | SUBDIRS = src test
6 |
7 | # add autogen on distribution
8 | EXTRA_DIST = bootstrap
9 |
10 | clean-local:
11 | rm -f zfile log
12 |
--------------------------------------------------------------------------------
/NOTES:
--------------------------------------------------------------------------------
1 |
2 | - How does the database prevent log entries from multiple
3 | threads or transactions from getting interleaved ?
4 |
5 | - There seems to be a lot of pointer chasing ? Is that necessary ?
6 | More NVM loads than stores !
7 |
8 | - It is a test bed ! Not something you would use in commercial setting !
9 | - No network overhead
10 | - Database is cleaned up on a shutdown, it does not persist across time
11 | - Entire heap is persistent - Objects that are required after a crash are "marked",
12 | the once that are not needed are not "marked". They are reclaimed on start.
13 | - All malloc or mmap requests are intercepted and routed to userspace memory allocator
14 | that works with best/first fit. It works with variable size chunks and not fixed page sizes
15 | - Sort of like Mnemosyne
16 | - Mmap a file as heap
17 | - Atomically update it
18 | - intercept all memory allocation requests
19 | - memcached asks for a giant heap and uses a slab allocator, traditionally
20 | - mnemosyne now manages the slab allocator, making sure all allocations and deallocations are atomic
21 | - What about a OS based atomic memory allocator ? What are the software overheads ?
22 | - If we have flush on failure, why even bother about ordering ?
23 | - Processor catches fire
24 | - Memory bus caches fire
25 | - Cache hierarchy is corrupted
26 |
27 | - There is no pcommit at the end of each transaction. Instead a "gc" thread wakes up every five milliseconds
28 | and issues a pcommit.
29 | - Surprisingly, the gc thread calls fsync on the log file + a pcommit. Redundant. Fsync already calls pcommit.
30 | - Further, why do you even have to call fsync on the log file when u are using fwrite ?
31 | - PCOMMIT latency is 100 ns. He use __asm__ __volatile__ ("pause" ::: "memory") in combination with rdtsc
32 | - One has to remember to call pmemalloc_activate after requesting a block from the memory manager or else it will reclaimed
33 | during reboot !
34 | - wal_engine - fs_log
35 | - opt_wal_engine - pm_log
36 | - To get the db working in the emulator, i had to solve the issue of having two distinct versions of libc on a single machine
37 | - look at the sonar wiki
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # N-Store
2 |
3 | ## Storage architectures
4 |
5 | Evaluation of different storage architectures in database systems designed for non-volatile memory (NVM).
6 |
7 |
8 | ## Dependencies
9 |
10 | - **g++ 4.7+**
11 | - **autoconf** (`apt-get install autoconf libtool`)
12 |
13 | ## Setup
14 |
15 | ```
16 | ./bootstrap
17 | ./configure
18 | make
19 | ```
20 |
21 | ## Test
22 |
23 | ```
24 | ./src/n-store -h
25 | ```
26 |
27 |
28 |
--------------------------------------------------------------------------------
/bootstrap:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # bootstrap -- Use this script to create generated files from the CVS dist
3 |
4 | autoreconf -fvi
5 |
--------------------------------------------------------------------------------
/configure.ac:
--------------------------------------------------------------------------------
1 | # configure.in -- Process this file with autoconf to produce configure
2 | AC_PREREQ([2.64])
3 |
4 | AC_INIT([n-store], [0.1], [xyz@cs.cmu.edu])
5 | AC_CONFIG_HEADERS([config.h:config-h.in])
6 | AC_CONFIG_AUX_DIR([config])
7 | AC_CONFIG_MACRO_DIR([m4])
8 |
9 | AM_INIT_AUTOMAKE([1.0 foreign])
10 |
11 | AC_PROG_CC
12 |
13 | if test -z $CXXFLAGS; then
14 | CXXFLAGS='-ggdb -O3'
15 | fi
16 |
17 | AC_PROG_CXX
18 | AC_PROG_LIBTOOL
19 |
20 | # Check for pthreads (uses m4/acx_pthread.m4).
21 | ACX_PTHREAD([], [AC_MSG_ERROR([failed to find pthreads])])
22 |
23 | AC_LANG([C++])
24 |
25 | # turn on c++11
26 | AX_CXX_COMPILE_STDCXX_11(noext)
27 |
28 | #BOOST_REQUIRE([1.45])
29 | #BOOST_SYSTEM
30 | #BOOST_ASIO
31 | #BOOST_THREADS
32 | #BOOST_SERIALIZATION
33 |
34 | AC_CONFIG_FILES([Makefile
35 | src/Makefile
36 | test/Makefile])
37 |
38 | #[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h.in])
39 | AC_OUTPUT
40 | # @end 2
41 |
--------------------------------------------------------------------------------
/m4/ltversion.m4:
--------------------------------------------------------------------------------
1 | # ltversion.m4 -- version numbers -*- Autoconf -*-
2 | #
3 | # Copyright (C) 2004 Free Software Foundation, Inc.
4 | # Written by Scott James Remnant, 2004
5 | #
6 | # This file is free software; the Free Software Foundation gives
7 | # unlimited permission to copy and/or distribute it, with or without
8 | # modifications, as long as this notice is preserved.
9 |
10 | # @configure_input@
11 |
12 | # serial 3337 ltversion.m4
13 | # This file is part of GNU Libtool
14 |
15 | m4_define([LT_PACKAGE_VERSION], [2.4.2])
16 | m4_define([LT_PACKAGE_REVISION], [1.3337])
17 |
18 | AC_DEFUN([LTVERSION_VERSION],
19 | [macro_version='2.4.2'
20 | macro_revision='1.3337'
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22 | _LT_DECL(, macro_revision, 0)
23 | ])
24 |
--------------------------------------------------------------------------------
/misc/linux-examples/.gitignore:
--------------------------------------------------------------------------------
1 | .*.swp
2 | *.o
3 | tags
4 | testfile*
5 | *.out
6 |
--------------------------------------------------------------------------------
/misc/linux-examples/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013, Intel Corporation
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions
5 | are met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in
12 | the documentation and/or other materials provided with the
13 | distribution.
14 |
15 | * Neither the name of Intel Corporation nor the names of its
16 | contributors may be used to endorse or promote products derived
17 | from this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/misc/linux-examples/basic/.gitignore:
--------------------------------------------------------------------------------
1 | basic
2 |
--------------------------------------------------------------------------------
/misc/linux-examples/basic/README:
--------------------------------------------------------------------------------
1 | This is basic/README.
2 |
3 | This is a very basic example of a program storing some data to
4 | Persistent Memory and then reading it back later. This example
5 | also illustrates how to use libpmem to make sure stores are durable.
6 |
7 | usage: basic [-FMd] [-i icount] path [strings...]
8 |
9 | Where is a file on a Persistent Memory aware file system
10 | like PMFS. If path doesn't exist, this program will create it
11 | with size DEFAULT_SIZE (defined below).
12 |
13 | Any strings provided will be written to the Persistent Memory,
14 | each terminated by a '\0' character. If no strings are
15 | provided, the Persistent Memory is dumped out in a manner similar
16 | to strings(1).
17 |
18 | The -F flag enables the fault injection testing version of libpmem.
19 | This for more meaningful icount-based runs (see the -i flag below).
20 |
21 | The -M flag enables the msync-based version of libpmem.
22 | Use this when you don't have a PM-aware file system and you're
23 | running on traditional memory-mapped files instead.
24 |
25 | The -d flag turns on debugging prints.
26 |
27 | The -i flag, if given, turns on instruction counting for the
28 | code snippet under test (the code between icount_start() and
29 | icount_stop() below). Use "-i 0" to print the count, "-i N"
30 | to simulate a crash after N instructions. For more accurate
31 | fault injection testing, use this with the -F flag described above.
32 |
33 | Here are examples of how to run the basic code:
34 |
35 | basic testfile one two three
36 | basic testfile
37 |
38 | Also, you can run the fault injection test using:
39 |
40 | make allcounts
41 |
42 | This takes a while to run. Notice how the fault injection tests show you
43 | only parts of strings getting stored in some crash scenarios. This example
44 | illustrates how your Persistent Memory data structures can be in unexpected
45 | states due to system interruptions or program crashes. Compare this example
46 | with something like the linked-list test in ../libpmemalloc, where extra
47 | work is done to prevent half-done entries into the PM data structure.
48 |
--------------------------------------------------------------------------------
/misc/linux-examples/basic/basictest.pass:
--------------------------------------------------------------------------------
1 | Running test...
2 | rm -f testfile
3 | ./basic testfile one two three four
4 | ./basic testfile
5 | one
6 | two
7 | three
8 | four
9 | 0000000 o n e \0 t w o \0 t h r e e \0 f o
10 | 0000020 u r \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
11 | 0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
12 | *
13 | 0020000
14 | Done.
15 |
--------------------------------------------------------------------------------
/misc/linux-examples/binarytree/.gitignore:
--------------------------------------------------------------------------------
1 | tree_insert
2 | tree_walk
3 | tree_free
4 | tree_wordfreq
5 | 4000.txt
6 | 4300.txt
7 | 4302.txt
8 | 4309.txt
9 | 4500.txt
10 | 4000.zip
11 | 4300.zip
12 | 4302.zip
13 | 4309.zip
14 | 4500.zip
15 |
--------------------------------------------------------------------------------
/misc/linux-examples/binarytree/README:
--------------------------------------------------------------------------------
1 | This is binarytree/README.
2 |
3 | This is a simple binary tree for Persistent Memory, implemented
4 | on top of the libpmemalloc example. All the example code is in:
5 |
6 | tree.c
7 |
8 | The interfaces provided by this example are very simple -- you can
9 | see the list of the in:
10 |
11 | tree.h
12 |
13 | The other source files here are nothing but CLIs that gather arguments
14 | and call functions in tree.c for testing. Some examples of tests you
15 | can run to play with the tree implementation:
16 |
17 | tree_insert testfile string_one string_two string_one string_three
18 | tree_walk testfile
19 | tree_free testfile
20 |
21 | Like most examples, use -M to turn on the msync mode in libpmem, -F to turn
22 | on the fault injection test mode in libpmem, and -d to enable debug output.
23 |
24 | The command:
25 |
26 | make test
27 |
28 | will pull a bunch of text files from gutenberg.com and run them through
29 | the word frequency counting program "tree_wordfreq". The Makefile does
30 | this using the freqtest script and then checks the output against expected
31 | output in "freqtest.pass". The make succeeds if the test passes.
32 |
33 | The command:
34 |
35 | make allcounts
36 |
37 | will perform a fault injection test run (takes a while to run).
38 |
--------------------------------------------------------------------------------
/misc/linux-examples/binarytree/freqtest.pass:
--------------------------------------------------------------------------------
1 | Running test...
2 | rm -f testfile
3 | ./tree_wordfreq testfile 4000.txt 4300.txt 4302.txt 4309.txt 4500.txt
4 | Checking results...
5 | Summary of pmem pool:
6 | File size: 10485760, 10469312 allocatable bytes in pool
7 |
8 | State Bytes Clumps Largest Smallest
9 | Free 543744 1 543744 543744
10 | Reserved 0 0 0 0
11 | Activating 0 0 0 0
12 | Active 9925568 77543 192 128
13 | Freeing 0 0 0 0
14 | TOTAL 10469312 77544 543744 128
15 | Lines in tree: 77543
16 | Done.
17 |
--------------------------------------------------------------------------------
/misc/linux-examples/binarytree/tree.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, Intel Corporation
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | *
8 | * * Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | *
11 | * * Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in
13 | * the documentation and/or other materials provided with the
14 | * distribution.
15 | *
16 | * * Neither the name of Intel Corporation nor the names of its
17 | * contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | /*
34 | * tree.h -- definitions for the binary tree example
35 | */
36 |
37 | void tree_init(const char *path, size_t size);
38 | void tree_insert(const char *s);
39 | void tree_walk(void);
40 | void tree_free(void);
41 |
--------------------------------------------------------------------------------
/misc/linux-examples/icount/.gitignore:
--------------------------------------------------------------------------------
1 | icount_test
2 |
--------------------------------------------------------------------------------
/misc/linux-examples/icount/icount.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, Intel Corporation
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | *
8 | * * Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | *
11 | * * Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in
13 | * the documentation and/or other materials provided with the
14 | * distribution.
15 | *
16 | * * Neither the name of Intel Corporation nor the names of its
17 | * contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | /*
34 | * icount.h -- interfaces for the icount module
35 | */
36 |
37 | void icount_start(unsigned long life_remaining);
38 | void icount_stop(void);
39 | unsigned long icount_total(void);
40 |
--------------------------------------------------------------------------------
/misc/linux-examples/icount/icount_test.pass:
--------------------------------------------------------------------------------
1 | Program terminated after 4 instructions
2 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmem/.gitignore:
--------------------------------------------------------------------------------
1 | libpmem.a
2 | libpmem.so
3 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmem/pmem.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, Intel Corporation
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | *
8 | * * Redistributions of source code must retain the above copyright
9 | * notice, this list of conditions and the following disclaimer.
10 | *
11 | * * Redistributions in binary form must reproduce the above copyright
12 | * notice, this list of conditions and the following disclaimer in
13 | * the documentation and/or other materials provided with the
14 | * distribution.
15 | *
16 | * * Neither the name of Intel Corporation nor the names of its
17 | * contributors may be used to endorse or promote products derived
18 | * from this software without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | /*
34 | * pmem.h -- definitions of libpmem entry points
35 | */
36 |
37 | void pmem_msync_mode(void); /* for testing on non-PM memory-mapped files */
38 | void pmem_fit_mode(void); /* for fault injection testing */
39 |
40 | /* commonly-used functions for Persistent Memory */
41 | void *pmem_map(int fd, size_t len);
42 | void pmem_persist(void *addr, size_t len, int flags);
43 |
44 | /* for advanced users -- functions that do portions of pmem_persist() */
45 | void pmem_flush_cache(void *addr, size_t len, int flags);
46 | void pmem_fence(void);
47 | void pmem_drain_pm_stores(void);
48 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmem/pmem.map:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2013, Intel Corporation
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions
5 | # are met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | #
10 | # * Redistributions in binary form must reproduce the above copyright
11 | # notice, this list of conditions and the following disclaimer in
12 | # the documentation and/or other materials provided with the
13 | # distribution.
14 | #
15 | # * Neither the name of Intel Corporation nor the names of its
16 | # contributors may be used to endorse or promote products derived
17 | # from this software without specific prior written permission.
18 | #
19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | #
32 | # pmem.map -- linker map file for libpmem
33 | #
34 | libpmem.so {
35 | global:
36 | pmem_map;
37 | pmem_flush;
38 | pmem_drain_pm_stores;
39 | pmem_msync_mode;
40 | pmem_fit_mode;
41 | local:
42 | *;
43 | };
44 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmemalloc/.gitignore:
--------------------------------------------------------------------------------
1 | libpmemalloc.a
2 | libpmemalloc.so
3 | pmemalloc_test1
4 | pmemalloc_test2
5 | pmemalloc_check
6 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmemalloc/pmemalloc.map:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2013, Intel Corporation
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions
5 | # are met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | #
10 | # * Redistributions in binary form must reproduce the above copyright
11 | # notice, this list of conditions and the following disclaimer in
12 | # the documentation and/or other materials provided with the
13 | # distribution.
14 | #
15 | # * Neither the name of Intel Corporation nor the names of its
16 | # contributors may be used to endorse or promote products derived
17 | # from this software without specific prior written permission.
18 | #
19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | #
32 | # pmemalloc.map -- linker map file for libpmemalloc
33 | #
34 | libpmemalloc.so {
35 | global:
36 | pmemalloc_init;
37 | pmemalloc_static_area;
38 | pmemalloc_reserve;
39 | pmemalloc_unreserve;
40 | pmemalloc_persist;
41 | pmemalloc_free;
42 |
43 | local:
44 | *;
45 | };
46 |
--------------------------------------------------------------------------------
/misc/linux-examples/libpmemalloc/pmemalloctest.pass:
--------------------------------------------------------------------------------
1 | Running test...
2 | rm -f testfile
3 | ./pmemalloc_test1 testfile 1 2 3 4
4 | ./pmemalloc_test1 testfile
5 | 4 3 2 1
6 | Done.
7 |
--------------------------------------------------------------------------------
/misc/linux-examples/plist.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "libpm.h"
6 | #include "plist.h"
7 |
8 | using namespace std;
9 |
10 | extern struct static_info *sp;
11 |
12 | int main(int argc, char *argv[]) {
13 | const char* path = "./testfile";
14 |
15 | long pmp_size = 10 * 1024 * 1024;
16 | if ((pmp = pmemalloc_init(path, pmp_size)) == NULL)
17 | cout << "pmemalloc_init on :" << path << endl;
18 |
19 | sp = (struct static_info *) pmemalloc_static_area();
20 |
21 | plist* list = new plist(&sp->ptrs[0], &sp->ptrs[1]);
22 |
23 | int key;
24 | srand(time(NULL));
25 | int ops = 3;
26 |
27 | for (int i = 0; i < ops; i++) {
28 | key = rand() % 10;
29 |
30 | std::string str(2, 'a' + key);
31 | char* data = new char[3];
32 | pmemalloc_activate(data);
33 | strcpy(data, str.c_str());
34 |
35 | list->push_back(data);
36 | }
37 |
38 | list->display();
39 |
40 | char* updated_val = new char[3];
41 | pmemalloc_activate(updated_val);
42 | strcpy(updated_val, "ab");
43 |
44 | list->update(2, updated_val);
45 |
46 | updated_val = new char[3];
47 | pmemalloc_activate(updated_val);
48 | strcpy(updated_val, "cd");
49 |
50 | list->update(0, updated_val);
51 |
52 | list->display();
53 |
54 | delete list;
55 |
56 | return 0;
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/misc/linux-examples/ptreap.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 | #include "libpm.h"
8 | #include "ptreap.h"
9 |
10 | using namespace std;
11 |
12 | extern struct static_info* sp;
13 |
14 | void lookup(ptreap *tree, unsigned int version,
15 | const unsigned long key) {
16 | int* ret;
17 |
18 | ret = tree->at(version, key);
19 | cout << "version :: " << version << " key :: " << key << " ";
20 | if (ret != NULL)
21 | cout << "val :: " << (*ret) << endl;
22 | else
23 | cout << "val :: not found" << endl;
24 |
25 | }
26 |
27 | int main(int argc, char **argv) {
28 |
29 | const char* path = "./testfile";
30 |
31 | long pmp_size = 10 * 1024 * 1024;
32 | if ((pmp = pmemalloc_init(path, pmp_size)) == NULL)
33 | cout << "pmemalloc_init on :" << path << endl;
34 |
35 | sp = (struct static_info *) pmemalloc_static_area();
36 |
37 | int i;
38 | ptreap* tree = new ptreap(&sp->ptrs[0]);
39 |
40 | int n = 10;
41 | int* nums = new int[n];
42 | for (i = 0; i < n; ++i)
43 | nums[i] = i * 10;
44 |
45 | printf("Persistent Tree with many versions...\n");
46 |
47 | tree->insert(1, &(nums[1]));
48 | tree->insert(2, &(nums[2]));
49 | tree->insert(3, &(nums[3]));
50 | tree->insert(6, &(nums[6]));
51 |
52 | cout << "nodes ::" << tree->nnodes << endl;
53 |
54 | for (i = 1; i <= 4; ++i)
55 | lookup(tree, tree->current_version(), i);
56 |
57 | // Next version
58 | tree->next_version();
59 |
60 | tree->insert(2, &(nums[5]));
61 | tree->remove(3);
62 |
63 | tree->insert(4, &(nums[4]));
64 |
65 | for (i = 1; i <= 4; ++i)
66 | lookup(tree, tree->current_version(), i);
67 |
68 | cout << "nodes ::" << tree->nnodes << endl;
69 |
70 | lookup(tree, 1, 2);
71 | lookup(tree, 1, 3);
72 | lookup(tree, 0, 2);
73 | lookup(tree, 0, 3);
74 |
75 | cout << "nodes ::" << tree->nnodes << endl;
76 |
77 | tree->delete_versions(0);
78 |
79 | lookup(tree, 0, 2);
80 | lookup(tree, 0, 3);
81 |
82 | cout << "nodes ::" << tree->nnodes << endl;
83 |
84 | delete tree;
85 | sp->ptrs[0] = NULL;
86 |
87 | cout << "nodes ::" << tree->nnodes << endl;
88 |
89 | delete[] nums;
90 |
91 | return 0;
92 | }
93 |
--------------------------------------------------------------------------------
/misc/linux-examples/ptree.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | #include "libpm.h"
8 | #include "ptree.h"
9 |
10 | using namespace std;
11 |
12 | extern struct static_info* sp;
13 |
14 | int main() {
15 | const char* path = "./testfile";
16 |
17 | long pmp_size = 10 * 1024 * 1024;
18 | if ((pmp = pmemalloc_init(path, pmp_size)) == NULL)
19 | cout << "pmemalloc_init on :" << path << endl;
20 |
21 | sp = (struct static_info *) pmemalloc_static_area();
22 |
23 | ptree* tree = new ptree(&sp->ptrs[0]);
24 |
25 | int key;
26 | srand(time(NULL));
27 | int ops = 10;
28 |
29 | for (int i = 0; i < ops; i++) {
30 | key = rand() % 10;
31 | tree->insert(key, 0);
32 | }
33 |
34 | tree->display();
35 |
36 | delete tree;
37 |
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/misc/linux-examples/trivial/.gitignore:
--------------------------------------------------------------------------------
1 | trivial
2 | testfile
3 |
--------------------------------------------------------------------------------
/misc/linux-examples/trivial/README:
--------------------------------------------------------------------------------
1 | This is trivial/README.
2 |
3 | This is the most trivial example I could come up with to illustrate
4 | how to memory map Persistent Memory, store a few bytes to it, and
5 | make the stores durable. The example is totally self-contained in
6 | a single file. No hard problems are solved in this example -- it
7 | just shows you how to use mmap() and msync().
8 |
9 | To build this use:
10 | make
11 |
12 | To run a trivial test use:
13 | make test
14 |
--------------------------------------------------------------------------------
/misc/linux-examples/trivial/trivialtest.pass:
--------------------------------------------------------------------------------
1 | Running test...
2 | rm -f testfile
3 | dd if=/dev/zero of=testfile bs=4k count=1 status=noxfer
4 | 1+0 records in
5 | 1+0 records out
6 | ./trivial testfile
7 | Done.
8 | od -c testfile
9 | 0000000 H e l l o , P e r s i s t e n
10 | 0000020 t M e m o r y ! \0 \0 \0 \0 \0 \0 \0
11 | 0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
12 | *
13 | 0010000
14 | Done.
15 |
--------------------------------------------------------------------------------
/misc/linux-examples/util/README:
--------------------------------------------------------------------------------
1 | This is util/README.
2 |
3 | These are not the examples you're looking for.
4 |
5 | This directory just contains common routines for printing errors
6 | and debug information. Nothing particularly interesting here
7 | and nothing to do with Persistent Memory. Check out ../README
8 | to see which directories contain the examples.
9 |
10 | To use these routines, include util.h and compile util.c into
11 | your program. These are trivial to write, but they turn up
12 | again and again so they're here when you need them. They are:
13 |
14 | DEBUG(...) printf-like output to stderr, but only if
15 | the global flag Debug is non-zero The output
16 | includes file:line, name of function, and
17 | gets a newline appended. You can use DEBUG(NULL)
18 | to just trace that a line was executed.
19 |
20 | int Debug = 1; Put this at the top of one of your source files
21 | to turn on the DEBUG() statements mentioned above.
22 |
23 | FATAL(...) printf-like output to stderr with no return --
24 | just like DEBUG() above but then this function
25 | calls exit(1).
26 |
27 | FATALSYS(...) Same as FATAL() above, but the message contains
28 | the equivalent of perror() appended to it.
29 |
30 | USAGE(...) Prints to stderr "Usage: " followed by
31 | the argument format from taken from the global
32 | variable Usage, followed by any printf-like message
33 | given as arguments to USAGE(). Calls exit(1).
34 |
35 | char Usage[] = Put this at the top of one of your source files
36 | "args..."; so USAGE() knows how to print the argument format.
37 |
38 | Myname = argv[0]; Put this at the top of your main() so USAGE()
39 | knows what name to print.
40 |
41 | ASSERT(cnd); Assert that condition is true, turns into FATAL()
42 | if it isn't. Prints the condition on failure.
43 |
44 | ASSERTinfo(cnd, info); Same as ASSERT() above, except it also includes
45 | the additional information (info must be a string).
46 |
47 | ASSERTeq(lhs, rhs); Assert two integer-valued expressions are equal,
48 | if not calls FATAL() to print both expressions
49 | and their values. Handy for printing everything you
50 | need to work on a blown assertion without having
51 | to wish you had printed the values.
52 |
53 | ASSERTne(lhs, rhs); Assert two integer-valued expressions are not equal.
54 |
--------------------------------------------------------------------------------
/misc/mmalloc/MAINTAINERS:
--------------------------------------------------------------------------------
1 | The mmalloc directory is maintained by the GDB group's Host
2 | maintainers.
3 |
4 | This code is in a maintain-only phase - only configury patches fixing
5 | host compile problems are generally accepted.
6 |
--------------------------------------------------------------------------------
/misc/mmalloc/TODO:
--------------------------------------------------------------------------------
1 | Things that still need attention:
2 |
3 | * Make implementation changes necessary to allow multiple processes
4 | to use the mmalloc managed region simultaneously. This requires,
5 | at the minimum, some sort of cooperative locking that ensures that
6 | only one process at a time is changing any of the mmalloc managed
7 | data structures (its ok for the mmalloc managed data regions to be
8 | changed at any time since we don't care about their contents).
9 |
10 | * In order to support multiple processes using the mmalloc managed
11 | region, the malloc descriptor needs to be broken into two parts,
12 | one part which is specific to the given process and is maintained
13 | separately on a per process basis, and another part which is common
14 | to all processes. As an example, the file descriptor is specific
15 | to a given process, as are the morecore and abortfunc pointers.
16 | However magic[], the version number, the flags field, etc are
17 | common to all processes.
18 |
--------------------------------------------------------------------------------
/misc/mmalloc/acinclude.m4:
--------------------------------------------------------------------------------
1 | sinclude(../bfd/acinclude.m4)
2 |
--------------------------------------------------------------------------------
/misc/mmalloc/configure.in:
--------------------------------------------------------------------------------
1 | dnl Autoconf configure script for MMALLOC, the GNU mmemory allocator.
2 | dnl Copyright 2000 Free Software Foundation, Inc.
3 | dnl
4 | dnl This file is part of GDB.
5 | dnl
6 | dnl This program is free software; you can redistribute it and/or modify
7 | dnl it under the terms of the GNU General Public License as published by
8 | dnl the Free Software Foundation; either version 2 of the License, or
9 | dnl (at your option) any later version.
10 | dnl
11 | dnl This program is distributed in the hope that it will be useful,
12 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | dnl GNU General Public License for more details.
15 | dnl
16 | dnl You should have received a copy of the GNU General Public License
17 | dnl along with this program; if not, write to the Free Software
18 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | dnl Process this file with autoconf to produce a configure script.
20 |
21 | AC_PREREQ(2.12.1)dnl
22 | AC_INIT(mmalloc.c)
23 |
24 | AC_PROG_CC
25 | AC_PROG_INSTALL
26 | AC_CHECK_TOOL(AR, ar)
27 | AC_CHECK_TOOL(RANLIB, ranlib, :)
28 |
29 | AC_FUNC_MMAP
30 | AC_CHECK_HEADERS(limits.h stddef.h unistd.h)
31 |
32 | BFD_NEED_DECLARATION(sbrk)
33 | BFD_NEED_DECLARATION(getpagesize)
34 |
35 | AC_OUTPUT(Makefile)
36 |
--------------------------------------------------------------------------------
/misc/mmalloc/keys.c:
--------------------------------------------------------------------------------
1 | /* Access for application keys in mmap'd malloc managed region.
2 | Copyright 1992 Free Software Foundation, Inc.
3 |
4 | Contributed by Fred Fish at Cygnus Support. fnf@cygnus.com
5 |
6 | This file is part of the GNU C Library.
7 |
8 | The GNU C Library is free software; you can redistribute it and/or
9 | modify it under the terms of the GNU Library General Public License as
10 | published by the Free Software Foundation; either version 2 of the
11 | License, or (at your option) any later version.
12 |
13 | The GNU C Library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Library General Public License for more details.
17 |
18 | You should have received a copy of the GNU Library General Public
19 | License along with the GNU C Library; see the file COPYING.LIB. If
20 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 | Boston, MA 02111-1307, USA. */
22 |
23 | /* This module provides access to some keys that the application can use to
24 | provide persistent access to locations in the mapped memory section.
25 | The intent is that these keys are to be used sparingly as sort of
26 | persistent global variables which the application can use to reinitialize
27 | access to data in the mapped region.
28 |
29 | For the moment, these keys are simply stored in the malloc descriptor
30 | itself, in an array of fixed length. This should be fixed so that there
31 | can be an unlimited number of keys, possibly using a multilevel access
32 | scheme of some sort. */
33 |
34 | #include "mmprivate.h"
35 |
36 | int
37 | mmalloc_setkey (md, keynum, key)
38 | PTR md;
39 | int keynum;
40 | PTR key;
41 | {
42 | struct mdesc *mdp = (struct mdesc *) md;
43 | int result = 0;
44 |
45 | if ((mdp != NULL) && (keynum >= 0) && (keynum < MMALLOC_KEYS))
46 | {
47 | mdp -> keys [keynum] = key;
48 | result++;
49 | }
50 | return (result);
51 | }
52 |
53 | PTR
54 | mmalloc_getkey (md, keynum)
55 | PTR md;
56 | int keynum;
57 | {
58 | struct mdesc *mdp = (struct mdesc *) md;
59 | PTR keyval = NULL;
60 |
61 | if ((mdp != NULL) && (keynum >= 0) && (keynum < MMALLOC_KEYS))
62 | {
63 | keyval = mdp -> keys [keynum];
64 | }
65 | return (keyval);
66 | }
67 |
--------------------------------------------------------------------------------
/misc/mmalloc/mcalloc.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
2 | This file is part of the GNU C Library.
3 |
4 | The GNU C Library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public License as
6 | published by the Free Software Foundation; either version 2 of the
7 | License, or (at your option) any later version.
8 |
9 | The GNU C Library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public
15 | License along with the GNU C Library; see the file COPYING.LIB. If
16 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 | Boston, MA 02111-1307, USA. */
18 |
19 | #include /* GCC on HP/UX needs this before string.h. */
20 | #include /* Prototypes for memcpy, memmove, memset, etc */
21 |
22 | #include "mmprivate.h"
23 |
24 | /* Allocate an array of NMEMB elements each SIZE bytes long.
25 | The entire array is initialized to zeros. */
26 |
27 | PTR
28 | mcalloc (md, nmemb, size)
29 | PTR md;
30 | register size_t nmemb;
31 | register size_t size;
32 | {
33 | register PTR result;
34 |
35 | if ((result = mmalloc (md, nmemb * size)) != NULL)
36 | {
37 | memset (result, 0, nmemb * size);
38 | }
39 | return (result);
40 | }
41 |
42 | /* When using this package, provide a version of malloc/realloc/free built
43 | on top of it, so that if we use the default sbrk() region we will not
44 | collide with another malloc package trying to do the same thing, if
45 | the application contains any "hidden" calls to malloc/realloc/free (such
46 | as inside a system library). */
47 |
48 | PTR
49 | calloc (nmemb, size)
50 | size_t nmemb;
51 | size_t size;
52 | {
53 | return (mcalloc ((PTR) NULL, nmemb, size));
54 | }
55 |
--------------------------------------------------------------------------------
/misc/mmalloc/mm.c:
--------------------------------------------------------------------------------
1 | /* Build the entire mmalloc library as a single object module. This
2 | avoids having clients pick up part of their allocation routines
3 | from mmalloc and part from libc, which results in undefined
4 | behavior. It should also still be possible to build the library
5 | as a standard library with multiple objects.
6 |
7 | Copyright 1996, 2000 Free Software Foundation
8 |
9 | The GNU C Library is free software; you can redistribute it and/or
10 | modify it under the terms of the GNU Library General Public License as
11 | published by the Free Software Foundation; either version 2 of the
12 | License, or (at your option) any later version.
13 |
14 | The GNU C Library is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | Library General Public License for more details.
18 |
19 | You should have received a copy of the GNU Library General Public
20 | License along with the GNU C Library; see the file COPYING.LIB. If
21 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 | Boston, MA 02111-1307, USA. */
23 |
24 | #ifdef HAVE_UNISTD_H
25 | #include /* Prototypes for lseek, sbrk (maybe) */
26 | #endif
27 | #include "mcalloc.c"
28 | #include "mfree.c"
29 | #include "mmalloc.c"
30 | #include "mmcheck.c"
31 | #include "mmemalign.c"
32 | #include "mmstats.c"
33 | #include "mmtrace.c"
34 | #include "mrealloc.c"
35 | #include "mvalloc.c"
36 | #include "mmap-sup.c"
37 | #include "attach.c"
38 | #include "detach.c"
39 | #include "keys.c"
40 | #include "sbrk-sup.c"
41 |
--------------------------------------------------------------------------------
/misc/mmalloc/mmalloc.h:
--------------------------------------------------------------------------------
1 | #ifndef MMALLOC_H
2 | #define MMALLOC_H 1
3 |
4 | #ifdef HAVE_STDDEF_H
5 | # include
6 | #else
7 | # include /* for size_t */
8 | # include /* for NULL */
9 | #endif
10 |
11 | #include "ansidecl.h"
12 |
13 | /* Allocate SIZE bytes of memory. */
14 |
15 | extern PTR mmalloc PARAMS ((PTR, size_t));
16 |
17 | /* Re-allocate the previously allocated block in PTR, making the new block
18 | SIZE bytes long. */
19 |
20 | extern PTR mrealloc PARAMS ((PTR, PTR, size_t));
21 |
22 | /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
23 |
24 | extern PTR mcalloc PARAMS ((PTR, size_t, size_t));
25 |
26 | /* Free a block allocated by `mmalloc', `mrealloc' or `mcalloc'. */
27 |
28 | extern void mfree PARAMS ((PTR, PTR));
29 |
30 | /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
31 |
32 | extern PTR mmemalign PARAMS ((PTR, size_t, size_t));
33 |
34 | /* Allocate SIZE bytes on a page boundary. */
35 |
36 | extern PTR mvalloc PARAMS ((PTR, size_t));
37 |
38 | /* Activate a standard collection of debugging hooks. */
39 |
40 | extern int mmcheck PARAMS ((PTR, void (*) (void)));
41 |
42 | extern int mmcheckf PARAMS ((PTR, void (*) (void), int));
43 |
44 | /* Pick up the current statistics. (see FIXME elsewhere) */
45 |
46 | extern struct mstats mmstats PARAMS ((PTR));
47 |
48 | extern PTR mmalloc_attach PARAMS ((int, PTR));
49 |
50 | extern PTR mmalloc_detach PARAMS ((PTR));
51 |
52 | extern int mmalloc_setkey PARAMS ((PTR, int, PTR));
53 |
54 | extern PTR mmalloc_getkey PARAMS ((PTR, int));
55 |
56 | extern int mmalloc_errno PARAMS ((PTR));
57 |
58 | extern int mmtrace PARAMS ((void));
59 |
60 | extern PTR mmalloc_findbase PARAMS ((int));
61 |
62 | #endif /* MMALLOC_H */
63 |
--------------------------------------------------------------------------------
/misc/mmalloc/mmemalign.c:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
2 | This file is part of the GNU C Library.
3 |
4 | The GNU C Library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public License as
6 | published by the Free Software Foundation; either version 2 of the
7 | License, or (at your option) any later version.
8 |
9 | The GNU C Library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public
15 | License along with the GNU C Library; see the file COPYING.LIB. If
16 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 | Boston, MA 02111-1307, USA. */
18 |
19 | #include "mmprivate.h"
20 |
21 | PTR
22 | mmemalign (md, alignment, size)
23 | PTR md;
24 | size_t alignment;
25 | size_t size;
26 | {
27 | PTR result;
28 | unsigned long int adj;
29 | struct alignlist *l;
30 | struct mdesc *mdp;
31 |
32 | if ((result = mmalloc (md, size + alignment - 1)) != NULL)
33 | {
34 | adj = RESIDUAL (result, alignment);
35 | if (adj != 0)
36 | {
37 | mdp = MD_TO_MDP (md);
38 | for (l = mdp -> aligned_blocks; l != NULL; l = l -> next)
39 | {
40 | if (l -> aligned == NULL)
41 | {
42 | /* This slot is free. Use it. */
43 | break;
44 | }
45 | }
46 | if (l == NULL)
47 | {
48 | l = (struct alignlist *) mmalloc (md, sizeof (struct alignlist));
49 | if (l == NULL)
50 | {
51 | mfree (md, result);
52 | return (NULL);
53 | }
54 | l -> next = mdp -> aligned_blocks;
55 | mdp -> aligned_blocks = l;
56 | }
57 | l -> exact = result;
58 | result = l -> aligned = (char *) result + alignment - adj;
59 | }
60 | }
61 | return (result);
62 | }
63 |
--------------------------------------------------------------------------------
/misc/mmalloc/mmstats.c:
--------------------------------------------------------------------------------
1 | /* Access the statistics maintained by `mmalloc'.
2 | Copyright 1990, 1991, 1992 Free Software Foundation
3 |
4 | Written May 1989 by Mike Haertel.
5 | Modified Mar 1992 by Fred Fish. (fnf@cygnus.com)
6 |
7 | The GNU C Library is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU Library General Public License as
9 | published by the Free Software Foundation; either version 2 of the
10 | License, or (at your option) any later version.
11 |
12 | The GNU C Library is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | Library General Public License for more details.
16 |
17 | You should have received a copy of the GNU Library General Public
18 | License along with the GNU C Library; see the file COPYING.LIB. If
19 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 | Boston, MA 02111-1307, USA.
21 |
22 | The author may be reached (Email) at the address mike@ai.mit.edu,
23 | or (US mail) as Mike Haertel c/o Free Software Foundation. */
24 |
25 | #include "mmprivate.h"
26 |
27 | /* FIXME: See the comment in mmprivate.h where struct mstats is defined.
28 | None of the internal mmalloc structures should be externally visible
29 | outside the library. */
30 |
31 | struct mstats
32 | mmstats (md)
33 | PTR md;
34 | {
35 | struct mstats result;
36 | struct mdesc *mdp;
37 |
38 | mdp = MD_TO_MDP (md);
39 | result.bytes_total =
40 | (char *) mdp -> morecore (mdp, 0) - mdp -> heapbase;
41 | result.chunks_used = mdp -> heapstats.chunks_used;
42 | result.bytes_used = mdp -> heapstats.bytes_used;
43 | result.chunks_free = mdp -> heapstats.chunks_free;
44 | result.bytes_free = mdp -> heapstats.bytes_free;
45 | return (result);
46 | }
47 |
--------------------------------------------------------------------------------
/misc/mmalloc/mmtrace.awk:
--------------------------------------------------------------------------------
1 | #
2 | # Awk program to analyze mtrace.c output.
3 | #
4 | $1 == "+" { if (allocated[$2] != "")
5 | print "+", $2, "Alloc", NR, "duplicate:", allocated[$2];
6 | else
7 | allocated[$2] = $3;
8 | }
9 | $1 == "-" { if (allocated[$2] != "") {
10 | allocated[$2] = "";
11 | if (allocated[$2] != "")
12 | print "DELETE FAILED", $2, allocated[$2];
13 | } else
14 | print "-", $2, "Free", NR, "was never alloc'd";
15 | }
16 | $1 == "<" { if (allocated[$2] != "")
17 | allocated[$2] = "";
18 | else
19 | print "-", $2, "Realloc", NR, "was never alloc'd";
20 | }
21 | $1 == ">" { if (allocated[$2] != "")
22 | print "+", $2, "Realloc", NR, "duplicate:", allocated[$2];
23 | else
24 | allocated[$2] = $3;
25 | }
26 |
27 | # Ignore "= Start"
28 | $1 == "=" { }
29 | # Ignore failed realloc attempts for now
30 | $1 == "!" { }
31 |
32 |
33 | END { for (x in allocated)
34 | if (allocated[x] != "")
35 | print "+", x, allocated[x];
36 | }
37 |
--------------------------------------------------------------------------------
/misc/mmalloc/mvalloc.c:
--------------------------------------------------------------------------------
1 | /* Allocate memory on a page boundary.
2 | Copyright (C) 1991 Free Software Foundation, Inc.
3 |
4 | The GNU C Library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public License as
6 | published by the Free Software Foundation; either version 2 of the
7 | License, or (at your option) any later version.
8 |
9 | The GNU C Library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public
15 | License along with the GNU C Library; see the file COPYING.LIB. If
16 | not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 | Boston, MA 02111-1307, USA. */
18 |
19 | #include "mmprivate.h"
20 |
21 | /* Cache the pagesize for the current host machine. Note that if the host
22 | does not readily provide a getpagesize() function, we need to emulate it
23 | elsewhere, not clutter up this file with lots of kluges to try to figure
24 | it out. */
25 |
26 | static size_t cache_pagesize;
27 | #if NEED_DECLARATION_GETPAGESIZE
28 | extern int getpagesize PARAMS ((void));
29 | #endif
30 |
31 | PTR
32 | mvalloc (md, size)
33 | PTR md;
34 | size_t size;
35 | {
36 | if (cache_pagesize == 0)
37 | {
38 | cache_pagesize = getpagesize ();
39 | }
40 |
41 | return (mmemalign (md, cache_pagesize, size));
42 | }
43 |
44 |
45 | PTR
46 | valloc (size)
47 | size_t size;
48 | {
49 | return mvalloc ((PTR) NULL, size);
50 | }
51 |
--------------------------------------------------------------------------------
/misc/pcommit/pm_helper.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #define CPU_FREQ_MHZ (2593)
6 |
7 | static inline unsigned long read_tsc(void)
8 | {
9 | unsigned long var;
10 | unsigned int hi, lo;
11 |
12 | asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
13 | var = ((unsigned long long int) hi << 32) | lo;
14 |
15 | return var;
16 | }
17 |
18 | static inline void cpu_pause()
19 | {
20 | __asm__ volatile ("pause" ::: "memory");
21 | }
22 |
23 | static inline void clwb(void *addr)
24 | {
25 | cpu_pause();
26 | }
27 |
28 | static inline void pm_wbarrier(unsigned long lat)
29 | {
30 | unsigned long etsc = read_tsc() + (unsigned long)(lat*CPU_FREQ_MHZ/1000);
31 | while (read_tsc() < etsc)
32 | cpu_pause();
33 | }
34 |
35 | #define DELAY_IN_NS (5000)
36 |
37 | static inline void measure()
38 | {
39 | unsigned long stsc, etsc;
40 |
41 | stsc = read_tsc();
42 | pm_wbarrier(DELAY_IN_NS);
43 | etsc = read_tsc();
44 | printf ("pm_wbarrier latency: %lu ns\n",
45 | (unsigned long)((etsc-stsc)*1000/CPU_FREQ_MHZ));
46 |
47 | stsc = read_tsc();
48 | pm_wbarrier(2*DELAY_IN_NS);
49 | etsc = read_tsc();
50 | printf ("pm_wbarrier latency: %lu ns\n",
51 | (unsigned long)((etsc-stsc)*1000/CPU_FREQ_MHZ));
52 |
53 | stsc = read_tsc();
54 | clwb(NULL);
55 | etsc = read_tsc();
56 | printf ("clwb latency: %lu ns\n",
57 | (unsigned long)((etsc-stsc)*1000/CPU_FREQ_MHZ));
58 | }
59 |
60 | int main(void)
61 | {
62 | measure();
63 | return 0;
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/misc/pmem/pmem_check.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * pmemalloc_check.c -- check the health of a pmem pool
3 | * Usage: pmemalloc_check [-FMd] path
4 | * This is just a simple CLI for calling pmemalloc_check().
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include "libpm.h"
15 |
16 | using namespace std;
17 |
18 | char Usage[] = "pmem_check "; /* for USAGE() */
19 |
20 | int main(int argc, char *argv[]) {
21 | const char *path;
22 |
23 | if (optind >= argc)
24 | printf("No path given \nUsage:: %s \n", Usage);
25 | path = argv[optind++];
26 |
27 | if (optind < argc)
28 | printf("Usage :: %s \n", Usage);
29 |
30 | storage::pmemalloc_check(path);
31 |
32 | exit(0);
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/misc/test/mmaptest.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | int main(int argc, char *argv[]) {
11 | int fd, offset;
12 | char *data;
13 | struct stat sbuf;
14 |
15 | if (argc != 1) {
16 | fprintf(stderr, "usage: mmapdemo \n");
17 | exit(1);
18 | }
19 |
20 | fd = open("log", O_RDWR | O_CREAT);
21 | if (fd < 0) {
22 | perror("open");
23 | exit(1);
24 | }
25 |
26 | size_t len = 8UL * 1024;
27 | if (posix_fallocate(fd, 0, len) < 0) {
28 | perror("open");
29 | exit(1);
30 | }
31 |
32 | if (stat("log", &sbuf) == -1) {
33 | perror("stat");
34 | exit(1);
35 | }
36 |
37 | printf("size : %lu\n", sbuf.st_size);
38 | printf("fd : %d\n", fd);
39 |
40 | caddr_t location = (caddr_t) 0x010000000;
41 |
42 | if ((data = (char*) mmap(location, sbuf.st_size, PROT_WRITE, MAP_SHARED, fd,
43 | 0)) == (caddr_t) (-1)) {
44 | perror("mmap");
45 | exit(1);
46 | }
47 |
48 | printf("data : %s %p\n", data, data);
49 |
50 | char cmd[512];
51 | sprintf(cmd, "cat /proc/%d/maps", getpid());
52 | system(cmd);
53 |
54 | data[2] = 'x';
55 |
56 | char* ptr = (char*) (location + 2);
57 |
58 | printf("data : %p %c \n", ptr, (*ptr));
59 |
60 | msync(data, sbuf.st_size, MS_SYNC);
61 |
62 | return 0;
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/misc/test/serialize.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include