Skip to content

Commit

Permalink
Add: eBPF profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
hov1417 committed Jul 30, 2023
1 parent 01d53f4 commit 1991aac
Show file tree
Hide file tree
Showing 10 changed files with 1,065 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ code-review*.bak
*.exe
*.out
*.app

**/__pycache__/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ add_executable(ucsb_bench ./src/bench.cxx)

if(${UCSB_BUILD_USTORE})
# Choose engine. Available engines: UCSET, ROCKSDB, LEVELDB, UDISK
set(USTORE_ENGINE_NAME UCSET)
set(USTORE_ENGINE_NAME UCSET)

include("${CMAKE_MODULE_PATH}/ustore.cmake")
list(APPEND UCSB_DB_LIBS "ustore")
target_compile_definitions(ucsb_bench PUBLIC UCSB_HAS_USTORE=1)
target_compile_definitions(ucsb_bench PUBLIC UCSB_HAS_USTORE=1)
endif()

if(${UCSB_BUILD_ROCKSDB})
Expand Down
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,34 @@ MAINTAINER [email protected]

WORKDIR ./

RUN apt-get update
RUN apt update
ENV DEBIAN_FRONTEND noninteractive

# Install tools
RUN apt install -y python3-pip
RUN pip3 install cmake
RUN pip3 install conan
RUN apt install -y gcc-10
RUN apt install -y g++-10
RUN apt-get install -y libexplain-dev
RUN apt-get install -y libsnappy-dev
RUN apt-get install -yq pkg-config
RUN apt-get install -y git
RUN apt install -y libexplain-dev
RUN apt install -y libsnappy-dev
RUN apt install -y pkg-config
RUN apt install -y git

# Build WiredTiger (latest)
RUN git clone git://github.com/wiredtiger/wiredtiger.git
RUN git clone --depth 1 git@github.com:wiredtiger/wiredtiger.git
RUN mkdir ./wiredtiger/build
WORKDIR "./wiredtiger/build"
RUN cmake ../.
RUN cmake ..
RUN make install

WORKDIR /

# Build UCSB
RUN git clone https://github.com/unum-cloud/ucsb.git
RUN git clone --depth 1 git@github.com:unum-cloud/ucsb.git
WORKDIR "./ucsb/"
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
RUN bash -i setup.sh
RUN bash -i build_release.sh
RUN rm -rf ./bench
RUN rm -rf ./bench/results

ENTRYPOINT ["./build_release/bin/ucsb_bench"]
ENTRYPOINT ["./build_release/build/bin/ucsb_bench"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ The outputs will be placed in the `bench/results/` folder.
git clone https://github.com/unum-cloud/ucsb.git && cd ucsb && ./run.py
```

### eBPF

There is an optional eBPF-based profiling, which can be enabled with `--with-ebpf` and `--with-ebpf-memory` flags,
before execution make sure you have `bcc` [installed](https://github.com/iovisor/bcc/blob/master/INSTALL.md) at least version 0.21.0.


## Supported Databases

Key-Value Stores and NoSQL databases differ in supported operations.
Expand Down
2 changes: 2 additions & 0 deletions cmake/leveldb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ if(NOT leveldb_POPULATED)
add_subdirectory(${leveldb_SOURCE_DIR} ${leveldb_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

add_compile_options(-g)

include_directories(${leveldb_SOURCE_DIR}/include)
Loading

0 comments on commit 1991aac

Please sign in to comment.