diff --git a/deps/oblib/src/lib/thread/protected_stack_allocator.cpp b/deps/oblib/src/lib/thread/protected_stack_allocator.cpp index 7f2edf3405..24309bdacc 100644 --- a/deps/oblib/src/lib/thread/protected_stack_allocator.cpp +++ b/deps/oblib/src/lib/thread/protected_stack_allocator.cpp @@ -145,7 +145,6 @@ void StackMgr::insert(ObStackHeader *header) header->next_ = dummy_.next_; dummy_.next_->prev_ = header; dummy_.next_ = header; - add_flow(header, 1); mutex_.unlock(); } } @@ -158,22 +157,9 @@ void StackMgr::erase(ObStackHeader *header) header->prev_->next_ = header->next_; header->next_->prev_ = header->prev_; header->prev_ = header->next_ = header; - add_flow(header, 0); mutex_.unlock(); } } -void StackMgr::add_flow(ObStackHeader *header, bool is_alloc) -{ - int ret = databuff_printf(flow_print_buf_, sizeof(flow_print_buf_), flow_print_pos_, - "%p %d %ld %ld %s\n", header, is_alloc, header->size_, GETTID(), lbt()); - if (OB_SUCC(ret) && flow_print_pos_ > sizeof(flow_print_buf_)/2) { - common::allow_next_syslog(); - _LOG_INFO("DUMP STACK FLOW:\n%.*s", static_cast(flow_print_pos_), flow_print_buf_); - flow_print_pos_ = 0; - } -} - - } // lib } // oceanbase diff --git a/deps/oblib/src/lib/thread/protected_stack_allocator.h b/deps/oblib/src/lib/thread/protected_stack_allocator.h index 061918792b..c0c334cb51 100644 --- a/deps/oblib/src/lib/thread/protected_stack_allocator.h +++ b/deps/oblib/src/lib/thread/protected_stack_allocator.h @@ -54,7 +54,6 @@ class StackMgr friend class ObMemoryCutter; public: StackMgr() - : flow_print_pos_(0) { dummy_.prev_ = dummy_.next_ = &dummy_; } @@ -62,12 +61,8 @@ public: void erase(ObStackHeader *); ObStackHeader *begin() { return dummy_.next_; } ObStackHeader *end() { return &dummy_; } -private: - void add_flow(ObStackHeader *header, bool is_alloc); private: lib::ObMutex mutex_; - char flow_print_buf_[8192]; - int64_t flow_print_pos_; ObStackHeader dummy_; };