Skip to content

Commit

Permalink
Support bthread tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
chenBright committed Dec 7, 2024
1 parent f187d2c commit 403dd40
Show file tree
Hide file tree
Showing 26 changed files with 1,184 additions and 266 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-all-dependences/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ runs:
using: "composite"
steps:
- uses: ./.github/actions/install-essential-dependences
- run: sudo apt-get install -y libgoogle-glog-dev automake bison flex libboost-all-dev libevent-dev libtool pkg-config libibverbs1 libibverbs-dev
- run: sudo apt-get install -y libgoogle-glog-dev automake bison flex libboost-all-dev libevent-dev libtool pkg-config libibverbs1 libibverbs-dev libunwind8-dev
shell: bash
- run: wget https://archive.apache.org/dist/thrift/0.11.0/thrift-0.11.0.tar.gz && tar -xf thrift-0.11.0.tar.gz
shell: bash
Expand Down
359 changes: 193 additions & 166 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,172 +14,199 @@ env:
proc_num: $(nproc)

jobs:
gcc-compile-with-make:
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- uses: ./.github/actions/init-make-config
with:
options: --cc=gcc --cxx=g++
- name: compile
run: |
make -j ${{env.proc_num}}
gcc-compile-with-cmake:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- name: cmake
run: |
export CC=gcc && export CXX=g++
mkdir build
cd build
cmake ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
gcc-compile-with-bazel:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures -- //... -//example/...

gcc-compile-with-boringssl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...

gcc-compile-with-make-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-all-dependences
- uses: ./.github/actions/init-make-config
with:
options: --cc=gcc --cxx=g++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock
- name: compile
run: |
make -j ${{env.proc_num}}
gcc-compile-with-cmake-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-all-dependences
- name: cmake
run: |
export CC=gcc && export CXX=g++
mkdir build
cd build
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
gcc-compile-with-bazel-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...

clang-compile-with-make:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- uses: ./.github/actions/init-make-config
with:
options: --cc=clang --cxx=clang++
- name: compile
run: |
make -j ${{env.proc_num}}
clang-compile-with-cmake:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- name: cmake
run: |
export CC=clang && export CXX=clang++
mkdir build
cd build
cmake ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
clang-compile-with-bazel:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel build --verbose_failures --action_env=CC=clang-12 -- //... -//example/...

clang-compile-with-boringssl:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel build --verbose_failures --action_env=CC=clang-12 --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...

clang-compile-with-make-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-all-dependences
- uses: ./.github/actions/init-make-config
with:
options: --cc=clang --cxx=clang++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock
- name: compile
run: |
make -j ${{env.proc_num}}
clang-compile-with-cmake-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-all-dependences
- name: cmake
run: |
export CC=clang && export CXX=clang++
mkdir build
cd build
cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
clang-compile-with-bazel-all-options:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: bazel build --verbose_failures --action_env=CC=clang-12 --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...

clang-unittest:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- name: install gtest
run: |
sudo apt-get update
sudo apt-get install -y cmake libgtest-dev gdb
cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/
- uses: ./.github/actions/init-make-config
with:
options: --cc=clang --cxx=clang++
- name: compile tests
run: |
cd test
make -j ${{env.proc_num}}
- name: run tests
run: |
cd test
sh ./run_tests.sh
- uses: actions/checkout@v2
- uses: ./.github/actions/install-essential-dependences
- name: install gtest
run: |
sudo git clone https://github.com/libunwind/libunwind.git && pwd && cd libunwind && sudo mkdir output && sudo autoreconf -i && sudo CC=clang CXX=clang++ ./configure --prefix=`pwd`/output && sudo make && sudo make install
sudo apt-get update
sudo apt-get install -y cmake libgtest-dev gdb libstdc++6-9-dbg
cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/
- uses: ./.github/actions/init-make-config
with:
options: --cc=clang --cxx=clang++ --with-bthread-tracer
- name: compile tests
run: |
cd test
make -j ${{env.proc_num}} bthread_unittest
- name: run tests
run: |
cat config.mk
cd test
pwd
echo "libunwind" && ldd `pwd`/../libunwind/output/lib/libunwind.so
echo "brpc" && ldd libbrpc.dbg.so
echo "bthread_unittest" && ldd bthread_unittest
sh ./run_tests.sh
# gcc-compile-with-make:
# runs-on: ubuntu-20.04 # https://github.com/actions/runner-images
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-essential-dependences
# - uses: ./.github/actions/init-make-config
# with:
# options: --cc=gcc --cxx=g++
# - name: compile
# run: |
# make -j ${{env.proc_num}}
#
# gcc-compile-with-cmake:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-essential-dependences
# - name: cmake
# run: |
# export CC=gcc && export CXX=g++
# mkdir build
# cd build
# cmake ..
# - name: compile
# run: |
# cd build
# make -j ${{env.proc_num}}
#
# gcc-compile-with-bazel:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel test --verbose_failures -- //... -//example/...
#
# gcc-compile-with-boringssl:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
#
# gcc-compile-with-make-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-all-dependences
# - uses: ./.github/actions/init-make-config
# with:
# options: --cc=gcc --cxx=g++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer
# - name: compile
# run: |
# make -j ${{env.proc_num}}
#
# gcc-compile-with-cmake-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-all-dependences
# - name: cmake
# run: |
# export CC=gcc && export CXX=g++
# mkdir build
# cd build
# cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -WITH_BTHREAD_TRACER=ON ..
# - name: compile
# run: |
# cd build
# make -j ${{env.proc_num}}
#
# gcc-compile-with-bazel-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel test --verbose_failures --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...
#
# clang-compile-with-make:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-essential-dependences
# - uses: ./.github/actions/init-make-config
# with:
# options: --cc=clang --cxx=clang++
# - name: compile
# run: |
# make -j ${{env.proc_num}}
#
# clang-compile-with-cmake:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-essential-dependences
# - name: cmake
# run: |
# export CC=clang && export CXX=clang++
# mkdir build
# cd build
# cmake ..
# - name: compile
# run: |
# cd build
# make -j ${{env.proc_num}}
#
# clang-compile-with-bazel:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel build --verbose_failures --action_env=CC=clang-12 -- //... -//example/...
#
# clang-compile-with-boringssl:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel build --verbose_failures --action_env=CC=clang-12 --define with_mesalink=false --define with_glog=true --define with_thrift=true --define BRPC_WITH_BORINGSSL=true -- //... -//example/...
#
# clang-compile-with-make-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-all-dependences
# - uses: ./.github/actions/init-make-config
# with:
# options: --cc=clang --cxx=clang++ --with-thrift --with-glog --with-rdma --with-debug-bthread-sche-safety --with-debug-lock --with-bthread-tracer
# - name: compile
# run: |
# make -j ${{env.proc_num}}
#
# clang-compile-with-cmake-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-all-dependences
# - name: cmake
# run: |
# export CC=clang && export CXX=clang++
# mkdir build
# cd build
# cmake -DWITH_MESALINK=OFF -DWITH_GLOG=ON -DWITH_THRIFT=ON -DWITH_RDMA=ON -DWITH_DEBUG_BTHREAD_SCHE_SAFETY=ON -DWITH_DEBUG_LOCK=ON -WITH_BTHREAD_TRACER=ON ..
# - name: compile
# run: |
# cd build
# make -j ${{env.proc_num}}
#
# clang-compile-with-bazel-all-options:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - run: bazel build --verbose_failures --action_env=CC=clang-12 --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true -- //... -//example/...
#
# clang-unittest:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: ./.github/actions/install-essential-dependences
# - name: install gtest
# run: |
# sudo apt-get update
# sudo apt-get install -y cmake libgtest-dev gdb libstdc++6-9-dbg libunwind8-dev
# cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/
# - uses: ./.github/actions/init-make-config
# with:
# options: --cc=clang --cxx=clang++ --with-bthread-tracer
# - name: compile tests
# run: |
# cd test
# make -j ${{env.proc_num}}
# - name: run tests
# run: |
# cd test
# sh ./run_tests.sh
Loading

0 comments on commit 403dd40

Please sign in to comment.