RFR: 8374372: Move OSX Serviceability Agent to macosx namespace
Harald Eilertsen
haraldei at openjdk.org
Wed Jan 7 10:35:28 UTC 2026
On Tue, 6 Jan 2026 21:20:29 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> The Mac OSX implementation of the Serviceability Agent and related code is quite different from what's needed from the BSD implementation. Still we have tried to keep the coexisting in one codebase in the out-of-tree BSD port, as that's where the OSX code has been living.
>>
>> This sometimes cause problems when updates to the Mac OSX port breaks the BSD implementation.
>>
>> As we are working on getting the BSD port into a state for future upstreaming to the mainline repo, this patch clears the path by moving the Mac OSX implementation of the Servicability Agent to a more fitting namespace.
>>
>> This should allow us to proceed with the BSD implementation undisturbed, but also without risking breaking the OSX port.
>>
>> This work was sponsored by The FreeBSD Foundation
>
>> The BSD code was broken in commit https://github.com/openjdk/jdk/commit/d3083ac05453c9dd303038f90ddab50d52124e51
>
> Okay that is very recent - and very unfortunate. But as we don't know if/when the out-of-tree BSD port will come back into mainline, I would not want to see the existing BSD support effectively gone in JDK 27+. To that end we may need to look at specifically fixing what broke in that commit. Though the BSD specific changes there look innocuous to me.
@dholmes-ora
> > The BSD code was broken in commit [d3083ac](https://github.com/openjdk/jdk/commit/d3083ac05453c9dd303038f90ddab50d52124e51)
>
> Okay that is very recent - and very unfortunate.
Sure, but also not unexpected :) That's the life of an out-of-tree port.
> But as we don't know if/when the out-of-tree BSD port will come back into mainline, I would not want to see the existing BSD support effectively gone in JDK 27+.
It is in practice gone already, and has been for a long time. While the directories, files, classes and functions have "bsd" in them, they are in reality macOS sources. While some of it can be used unmodified on (some) other BSDs, most of it needs to be patched.
So my idea was to move/rename this part that broke our port to better fit with reality, and then bring in the actual BSD code again in the BSD port. To me it feels cleaner, but I'll drop it if it's not wanted.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29003#issuecomment-3718247267
More information about the serviceability-dev
mailing list