tuaris opened a new pull request, #3223: URL: https://github.com/apache/brpc/pull/3223
### What problem does this PR solve? This is the first in a series of three PRs to add full FreeBSD platform support to brpc: 1. **This PR** — Remove dead code referencing non-existent `tracked_objects.h` 2. **PR TBD** — FreeBSD platform support (all changes guarded by `OS_FREEBSD`) 3. **PR TBD** — FreeBSD CI workflow via GitHub Actions + glog 0.7.x compatibility This first PR is intentionally small to get a feel for the project's review workflow. Problem Summary: [platform_thread_freebsd.cc](cci:7://file:///home/admin/Documents/Code/brpc/src/butil/threading/platform_thread_freebsd.cc:0:0-0:0) includes `butil/tracked_objects.h` and calls `tracked_objects::ThreadData::InitializeThreadContext(name)`, but this header and class were part of Chromium's base library profiling subsystem and were never ported to brpc. This causes a compile error on FreeBSD: ``` fatal error: 'butil/tracked_objects.h' file not found ``` The Linux (`platform_thread_linux.cc`) and macOS (`platform_thread_mac.mm`) equivalents already had these references removed. ### What is changed and the side effects? Changed: - Removed `#include "butil/tracked_objects.h"` from [platform_thread_freebsd.cc](cci:7://file:///home/admin/Documents/Code/brpc/src/butil/threading/platform_thread_freebsd.cc:0:0-0:0) - Removed the call to `tracked_objects::ThreadData::InitializeThreadContext(name)` from [PlatformThread::SetName()](cci:1://file:///home/admin/Documents/Ports/deluxe/devel/brpc/files/patch-src_butil_threading_platform__thread__freebsd.cc:12:1-17:2) This is pure dead code removal — the referenced header does not exist anywhere in the brpc source tree. Side effects: - Performance effects: None - Breaking backward compatibility: None — the removed code could never have compiled successfully. --- ### Check List: - Please make sure your changes are compatible. - When providing us with a new feature, it is best to add related tests. - Please follow [Contributor Covenant Code of Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
