Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8316433: net.dll should delay load winhttp.dll #15793

Closed
wants to merge 2 commits into from

Conversation

djelinski
Copy link
Member

@djelinski djelinski commented Sep 18, 2023

WinHTTP functions are only used when an application:

  • uses DefaultProxySelector to resolve proxies, and
  • is run with -Djava.net.useSystemProxies=true

In all other cases, loading winhttp.dll is a waste of resources.

Verified that:

  • existing tier1 and tier2 tests still pass
  • the same system proxies are returned with and without this patch
  • WinHTTP is not loaded unless DefaultProxySelector is used

Progress

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

Issue

  • JDK-8316433: net.dll should delay load winhttp.dll (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15793

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 18, 2023

👋 Welcome back djelinski! 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 openjdk bot changed the title 8316433 8316433: net.dll should delay load winhttp.dll Sep 18, 2023
@openjdk
Copy link

openjdk bot commented Sep 18, 2023

@djelinski The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • net

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

@openjdk openjdk bot added build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org net net-dev@openjdk.org labels Sep 18, 2023
@djelinski djelinski marked this pull request as ready for review September 18, 2023 19:02
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 18, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 18, 2023

Webrevs

@AlanBateman
Copy link
Contributor

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Sep 19, 2023
@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@AlanBateman
The core-libs label was successfully removed.

@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@djelinski This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8316433: net.dll should delay load winhttp.dll

Reviewed-by: erikj, ihse

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 61 new commits pushed to the master branch:

  • 913e43f: 8316582: Minor startup regression in 22-b15 due JDK-8310929
  • 23ed890: 6415065: Submenu is shown on wrong screen in multiple monitor environment
  • ca47f5f: 8316105: C2: Back to back Parse Predicates from different loops but with same deopt reason are wrongly grouped together
  • 1749ba2: 8311084: Add typeSymbol() API for applicable constant pool entries
  • 9f5d2b9: 8316285: Opensource JButton manual tests
  • a35e96a: 8313612: Use JUnit in lib-test/jdk tests
  • bee7524: 8315786: [AIX] Build Disk Local Detection Issue with GNU-utils df on AIX
  • ceff47b: 8315082: [REDO] Generational ZGC: Tests crash with assert(index == 0 || is_power_of_2(index))
  • df4a25b: 8308762: Metaspace leak with Instrumentation.retransform
  • 8412479: 8316229: Enhance class initialization logging
  • ... and 51 more: https://git.openjdk.org/jdk/compare/21c2dac15957e6d71e8f32a55f3825671da097a9...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 19, 2023
@@ -52,7 +52,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll \
Copy link
Contributor

Choose a reason for hiding this comment

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

Wonder if this could be LDFLAGS_microsoft_windows to emphasize the compiler that this applies to

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't mind that if you think it's only reasonable to support this with Visual Studio.

Copy link
Member Author

Choose a reason for hiding this comment

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

it's useful for VS and clang, but not supported by GCC (yet?). Since neither GCC nor Clang is supported now, I'd rather keep it.

Copy link
Member

Choose a reason for hiding this comment

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

@TheShermanTanker I understand where you are coming from, but as a matter of fact we still only support building on Windows with Visual Studio, and as long as we do, we only need to specify "windows" in situations like these.

Copy link
Member

@magicus magicus left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Michael-Mc-Mahon
Copy link
Member

Can't really comment on the specifics of the build change, but it seems like a reasonable change.

@djelinski
Copy link
Member Author

Thanks for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Sep 21, 2023

Going to push as commit 0637900.
Since your change was applied there have been 70 commits pushed to the master branch:

  • 90bcdbd: 8316581: Improve performance of Symbol::print_value_on()
  • 8350268: 8316453: [JVMCI] Using Xcomp on jargraal must eagerly initialize JVMCI
  • 3809d69: 8316240: Open source several add/remove MenuBar manual tests
  • 38bf119: 8310228: Improve error reporting for uncaught native exceptions on Windows
  • 349723c: 8315739: Missing null check in os::vm_min_address
  • 8cbe42b: 8316421: libjava should load shell32.dll eagerly
  • 378bcd5: 8316595: Alpine build fails after JDK-8314021
  • b3d75fe: 8310874: Runthese30m crashes with klass should be in the placeholders during verification
  • 6a4b665: 8316659: assert(LockingMode != LM_LIGHTWEIGHT || flag == CCR0) failed: bad condition register
  • 913e43f: 8316582: Minor startup regression in 22-b15 due JDK-8310929
  • ... and 60 more: https://git.openjdk.org/jdk/compare/21c2dac15957e6d71e8f32a55f3825671da097a9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 21, 2023
@openjdk openjdk bot closed this Sep 21, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 21, 2023
@openjdk
Copy link

openjdk bot commented Sep 21, 2023

@djelinski Pushed as commit 0637900.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@djelinski djelinski deleted the delayload-winhttp branch September 27, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated net net-dev@openjdk.org
6 participants