A library providing external memory efficient, cpu instruction and memory access trace oblivious algorithms.
Install cmake, ninja and intel sgx sdk, or use the cppbuilder docker image.
cd ./tools/docker/cppbuilder
docker build -t cppbuilder:latest .
docker run -it --rm -v $PWD:/builder -u $(id -u) cppbuilder
docker run --device=/dev/sgx_enclave -v /tmp/bucketfile:/ssdmount -it --rm -v $PWD:/builder cppbuilder
docker run --device=/dev/sgx_enclave -it --rm -v $PWD:/builder cppbuilder
rm -rf build
cmake -B build -G Ninja
ninja -C build
ninja -C build test
ninja -C build cppcheck
rm -rf build # Needed after the CC/CXX export or after changing the CMAKE_BUILD_TYPE
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -C build
source /startsgxenv.sh
cd applications/signal
make
ods - C++ odsl library code tests - C++ tests modules applications - Enclaves using odsl tools - tools used to generate graphs or test sets tools/docker - dockerfiles used for reproducible builds
common - common c++ utilies, cpu abstractions, cryptography abstractions and tracing code external_memory - external memory abstraction and sorting algorithms external_memory/server - server abstraction for different external memory scenarios (sgx, file system, ram) oram - oram implementations otree - oblivious binary search tree recoram - recursive oram implementations
chrome://tracing/
It's also possible to view in qt creator as described here: https://doc.qt.io/qtcreator/creator-ctf-visualizer.html
At last: https://ui.perfetto.dev/ seems ok also
-
Compile with ENABLE_PROFILING
-
For the functions that need profiling, add PROFILE_F(); at as the first line of the function code. Additionally add the function name to trace_events.hxx
-
Use PROFILER_SET(false); to disable profiling, use PROFILER_RESET() to write the profile to the log file (see profiling related functions in profiling_test to confirm).
-
Use any of the tools in "Links to view flamegraph files" above to look at the profiling, adjust uncached IO time based on the results of the benchmarks enclave (benchmark_sgx).