This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new ecab5952e5f [fix](compile) Fix macOS compilation issues for PURE macro and CPU core identification (#31357) ecab5952e5f is described below commit ecab5952e5f1ed15db771408a90e72acfdc80a2f Author: zy-kkk <zhongy...@gmail.com> AuthorDate: Sat Feb 24 11:54:45 2024 +0800 [fix](compile) Fix macOS compilation issues for PURE macro and CPU core identification (#31357) * [fix](compile) Correct PURE macro definition to fix compilation on macOS * 2 --- be/src/common/compiler_util.h | 2 +- be/src/pipeline/task_scheduler.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/be/src/common/compiler_util.h b/be/src/common/compiler_util.h index c3c850695f9..79588cade91 100644 --- a/be/src/common/compiler_util.h +++ b/be/src/common/compiler_util.h @@ -50,4 +50,4 @@ #define ALIGN_CACHE_LINE __attribute__((aligned(CACHE_LINE_SIZE))) -#define PURE __attribute_pure__ +#define PURE __attribute__((pure)) diff --git a/be/src/pipeline/task_scheduler.cpp b/be/src/pipeline/task_scheduler.cpp index 573def058fc..e9350084c14 100644 --- a/be/src/pipeline/task_scheduler.cpp +++ b/be/src/pipeline/task_scheduler.cpp @@ -312,7 +312,11 @@ void TaskScheduler::_do_work(size_t index) { if (ExecEnv::GetInstance()->pipeline_tracer_context()->enabled()) { TUniqueId query_id = task->query_context()->query_id(); std::string task_name = task->task_name(); +#ifdef __APPLE__ + uint32_t core_id = 0; +#else uint32_t core_id = sched_getcpu(); +#endif std::thread::id tid = std::this_thread::get_id(); uint64_t thread_id = *reinterpret_cast<uint64_t*>(&tid); uint64_t start_time = MonotonicMicros(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org