On Wed, 4 Feb 2026 11:56:15 GMT, Kevin Walls <[email protected]> wrote:
>> Yasumasa Suenaga has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains eight additional >> commits since the last revision: >> >> - Update testcase to skip if kernel debuginfo is not available >> - Merge branch 'master' into JDK-8376269 >> - Add new function to handle vDSO >> - Remove unneeded change >> - Remove 32 bit support >> - Update src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c >> >> Co-authored-by: Chris Plummer <[email protected]> >> - Update src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c >> >> Co-authored-by: Chris Plummer <[email protected]> >> - 8376269: Mixed jstack cannot find function in vDSO > > src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c line 732: > >> 730: >> 731: if (lib_name[0] != '\0') { // ignore empty lib names >> 732: if (strcmp("linux-vdso.so.1", lib_name) == 0 || > > Could we check this lib is at the VDSO address, so we know for sure it's the > one and only system vdso? > link_map_addr + LINK_MAP_ADDR_OFFSET == ps_prochandle->core->vdso_addr > Could do that instead of the name check, or in addition. I think it is better to compare with `lib_base` like this: if (lib_base == ph->core->vdso_addr) { lib_fd = handle_vdso(ph, lib_name, sizeof(lib_name)); } else { However it is difficult because `lib_base` is calculated in subsequent code with program header in ELF (in `find_base_address`). Maybe we can use `lib_base_diff` at here because debug log says virtual address for vDSO is same with vaddr in `l_addr` in `struct link_map` as following, but I'm not sure. libsaproc DEBUG: first link map is at 0x7fa08970d2f0 libsaproc DEBUG: replace vDSO: linux-vdso.so.1 -> /lib/modules/6.18.6-200.fc43.x86_64/vdso/vdso64.so libsaproc DEBUG: reading library /lib/modules/6.18.6-200.fc43.x86_64/vdso/vdso64.so @ 0x7fa0896d2000 [ 0x7fa0896d2000 ] libsaproc DEBUG: overwrote with new address mapping (memsz 8192 -> 8192) libsaproc DEBUG: /lib/modules/6.18.6-200.fc43.x86_64/vdso/vdso64.so [0] 0x7fa0896d2000-0x7fa0896d4000: base = 0x7fa0896d2000, vaddr = 0x0, memsz = 0x1883, filesz = 0x1883 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29400#discussion_r2766575815
