RFR: 8377798: Hotspot build on macOS aarch64 with unused-functions warning reports some unused functions

Matthias Baesken mbaesken at openjdk.org
Fri Feb 20 08:14:48 UTC 2026


On Fri, 20 Feb 2026 04:59:13 GMT, David Holmes <dholmes at openjdk.org> wrote:

> > David - can we address the 'suspicious' perfMemory issue in a separate issue?
> 
> Sure.

So (with sone declarations and checking left out) mmap_attach_shared  does this


static void mmap_attach_shared(int vmid, char** addr, size_t* sizep, TRAPS) {

  int nspid = LINUX_ONLY(os::Linux::get_namespace_pid(vmid)) NOT_LINUX(-1);
  const char* luser = NOT_MACOS(get_user_name(vmid, &nspid, CHECK));

  char* dirname = get_user_tmp_dir(luser, vmid, nspid);


while mmap_create_shared  has no get_namespace_pid call / namespace pid handling on Linux at all, is this maybe intentional  ?


static char* mmap_create_shared(size_t size) {

  int vmid = os::current_process_id();
  char* user_name = get_user_name(geteuid());

  char* dirname = get_user_tmp_dir(user_name, vmid, -1);

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29695#issuecomment-3932319150


More information about the hotspot-jfr-dev mailing list