Skip to content

8384085: Make os::Bsd::dlopen_helper private, and drop unused arg#31069

Open
snake66 wants to merge 2 commits intoopenjdk:masterfrom
snake66:upstream-master--dlopen-helper-cleanup
Open

8384085: Make os::Bsd::dlopen_helper private, and drop unused arg#31069
snake66 wants to merge 2 commits intoopenjdk:masterfrom
snake66:upstream-master--dlopen-helper-cleanup

Conversation

@snake66
Copy link
Copy Markdown
Contributor

@snake66 snake66 commented May 7, 2026

The os::Bsd::dlopen_helper function is only used by the locally by the class itself, so there's no reason to expose it publicly. Also, the mode arg is unused, and can be removed.

This work was sponsored by: The FreeBSD Foundation



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8384085: Make os::Bsd::dlopen_helper private, and drop unused arg (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31069/head:pull/31069
$ git checkout pull/31069

Update a local copy of the PR:
$ git checkout pull/31069
$ git pull https://git.openjdk.org/jdk.git pull/31069/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31069

View PR using the GUI difftool:
$ git pr show -t 31069

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31069.diff

Using Webrev

Link to Webrev Comment

The os::Bsd::dlopen_helper function is only used by the locally by the
class itself, so there's no reason to expose it publicly. Also, the mode
arg is unused, and can be removed.

This work was sponsored by: The FreeBSD Foundation

Co-authored-by: Greg Lewis <glewis@eyesbeyond.net>
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 7, 2026

👋 Welcome back haraldei! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label May 7, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

@snake66 The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 7, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-runtime. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label May 7, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 7, 2026

Webrevs

Copy link
Copy Markdown
Member

@Arraying Arraying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup! I've left a small suggestion for you to consider. Could you also please bump the Oracle copyright update year to 2026?

Comment thread src/hotspot/os/bsd/os_bsd.hpp Outdated
static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; }
static void set_numa_all_nodes(unsigned long* ptr) { _numa_all_nodes = ptr; }

static void *dlopen_helper(const char *path, char *ebuf, int ebuflen);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, if dlopen_helper is only ever called from dll_load's definition, there's plenty of precedent for it to just be a static function in the .cpp and not explicitly be listed as a class method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably even better. Thanks I'll update the patch.

This work is sponsored by The FreeBSD Foundation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime hotspot-runtime-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants