diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index b1704aa4f9..5d749a3231 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -119,7 +119,17 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - run: bazel build --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 --define with_asan=true -- //... -//example/... + - run: | + bazel build --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 \ + --define with_asan=true \ + --define with_bthread_tracer=true \ + --define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \ + -- //... -//example/... clang-compile-with-make-protobuf: runs-on: ubuntu-22.04 @@ -167,7 +177,18 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - run: bazel build --verbose_failures --action_env=CC=clang --define with_mesalink=false --define with_glog=true --define with_thrift=true --define with_debug_bthread_sche_safety=true --define with_debug_lock=true --define with_asan=true -- //... -//example/... + - run: | + bazel build --verbose_failures \ + --action_env=CC=clang \ + --define with_mesalink=false \ + --define with_glog=true \ + --define with_thrift=true \ + --define with_debug_bthread_sche_safety=true \ + --define with_debug_lock=true \ + --define with_asan=true \ + --define with_bthread_tracer=true \ + --define BRPC_WITH_NO_PTHREAD_MUTEX_HOOK=true \ + -- //... -//example/... clang-unittest: runs-on: ubuntu-22.04 diff --git a/.gitignore b/.gitignore index 9a60889afa..44a371abb8 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,10 @@ CTestTestfile.cmake /test/recordio_ref.io # Ignore protoc-gen-mcpack files -/protoc-gen-mcpack*/ \ No newline at end of file +/protoc-gen-mcpack*/ + +# Ignore bazel files +bazel-bin +bazel-out +bazel-testlogs +bazel-brpc diff --git a/BUILD.bazel b/BUILD.bazel index 3cfe83b6ff..a3e7b29f00 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -405,7 +405,7 @@ cc_library( ]), defines = [] + select({ "//bazel/config:brpc_with_bthread_tracer": [ - "-DBRPC_BTHREAD_TRACER", + "BRPC_BTHREAD_TRACER", ], "//conditions:default": [], }), diff --git a/src/bthread/task_tracer.cpp b/src/bthread/task_tracer.cpp index e2483495c7..415670aa71 100644 --- a/src/bthread/task_tracer.cpp +++ b/src/bthread/task_tracer.cpp @@ -23,8 +23,8 @@ #include "butil/fd_utility.h" #include "butil/memory/scope_guard.h" #include "butil/reloadable_flags.h" -#include -#include +#include "absl/debugging/stacktrace.h" +#include "absl/debugging/symbolize.h" #include #include #include