On Thu, 22 Oct 2026 22:04:50 GMT, Chris Plummer <[email protected]> wrote:
> I noticed under src/jdk.hotspot.agent/macosx/native/libsaproc/ we still have > a bunch of FreeBSD native code. You'll find it within #ifdef's like the > following: > > #ifdef __APPLE__ > // macosx code > #else > // FreeBSD code > #endif > > The #else part is only needed for the FreeBSD port, which is now located > under src/jdk.hotspot.agent/bsd/native/libsaproc/ (in the jdk freebsd repo). > All of it can be deleted, and I got approval from the bsd team to do this. It > is a fairly large chunk of code, and removing it will make browsing the > macosx code simpler. No more false grep hits. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Looks good to me. I've posted a couple of questions about possible leftovers. src/jdk.hotspot.agent/macosx/native/libsaproc/libproc_impl.h line 224: > 222: // reads thread info using libthread_db and calls above callback for > each thread > 223: bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb); > 224: Q: It seems the implementation of `read_thread_info()` and thread_info_callback have been removed in your fix. Is there any reason why the declarations a lines 220 and 223 are still needed? src/jdk.hotspot.agent/macosx/native/libsaproc/libproc_impl.h line 232: > 230: > 231: sa_thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t > pthread_id, lwpid_t lwp_id); > 232: // a test for ELF signature without using libelf Q: Is the comment about libelf at line 232 stale? src/jdk.hotspot.agent/macosx/native/libsaproc/libproc_impl.h line 264: > 262: > 263: // needed for when libthread_db is compiled with TD_DEBUG defined > 264: void ps_plog (const char *format, ...); Q: The same question is about `ps_plog()`: Is it still needed? ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/33524#pullrequestreview-5676007272 PR Review Comment: https://git.openjdk.org/jdk/pull/33524#discussion_r4395486735 PR Review Comment: https://git.openjdk.org/jdk/pull/33524#discussion_r4395530890 PR Review Comment: https://git.openjdk.org/jdk/pull/33524#discussion_r4395505968
