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

JDK-8266877: Missing local debug information when debugging JEP-330 #3939

Closed

Conversation

JaroslavTulach
Copy link
Contributor

@JaroslavTulach JaroslavTulach commented May 9, 2021

I am polishing support for JEP-330 in NetBeans (PR-2938) and I have problems with debugging. Local variables aren't visible as the compiler doesn't pass -g option when compiling the main class. I'd like to see

obrazek

however, that requires one to pass -g option to the compiler somehow. As far as I can say there is no such way and hence I decided to create this pull request. If I invoke:

$ java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y x.java

it detects JDWP is on and adds -g to the compiler arguments. Is this an acceptable improvement? The alternative is to avoid using JEP-330 when debugging and rather generate .class by invoking javac and then run it as usual, but I'd rather rely on JEP-330 and avoid creation of the .class file.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266877: Missing local debug information when debugging JEP-330

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3939/head:pull/3939
$ git checkout pull/3939

Update a local copy of the PR:
$ git checkout pull/3939
$ git pull https://git.openjdk.java.net/jdk pull/3939/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3939

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3939.diff

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented May 10, 2021

/label add compiler

@bridgekeeper bridgekeeper bot added the oca label May 10, 2021
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 10, 2021

Hi @JaroslavTulach, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user JaroslavTulach" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk openjdk bot added the compiler label May 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 10, 2021

@AlanBateman
The compiler label was successfully added.

@robilad
Copy link

@robilad robilad commented May 10, 2021

@JaroslavTulach, I've added your GitHub account to the set of verified accounts for OpenJDK.

@bridgekeeper bridgekeeper bot removed the oca label May 10, 2021
@JaroslavTulach JaroslavTulach changed the title When jdwp agentlib is on, compile JEP-330's main class with -g option JDK-8266877: Missing local debug information when debugging JEP-330 May 11, 2021
@openjdk openjdk bot added the rfr label May 11, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 11, 2021

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented May 11, 2021

@JaroslavTulach 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:

8266877: Missing local debug information when debugging JEP-330

Reviewed-by: alanb

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 199 new commits pushed to the master branch:

  • 3113910: 8267553: Extra JavaThread assignment in ClassLoader::create_class_path_entry()
  • 4d26f22: 8264304: Create implementation for NSAccessibilityToolbar protocol peer
  • 6288a99: 8267404: vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java failed with OutOfMemoryError
  • 71e2fa2: 8267531: [x86] Assembler::andb(Address,Register) encoding is incorrect
  • 4023646: 8266528: Optimize C2 VerifyIterativeGVN execution time
  • 2462316: 8261354: SIGSEGV at MethodIteratorHost
  • 72c9567: 8263486: Clean up MTLSurfaceDataBase.h
  • fe33343: 8256304: should MonitorUsedDeflationThreshold be experimental or diagnostic
  • 8f10c5a: 8267190: Optimize Vector API test operations
  • 94cfeb9: 8256155: Allow multiple large page sizes to be used on Linux
  • ... and 189 more: https://git.openjdk.java.net/jdk/compare/3af4efdfcfbbb52d38415374083c66c9e7b22604...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@AlanBateman) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label May 11, 2021
@jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented May 11, 2021

/csr

@openjdk openjdk bot added the csr label May 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 11, 2021

@jonathan-gibbons this pull request will not be integrated until the CSR request JDK-8266882 for issue JDK-8266877 has been approved.

@openjdk openjdk bot removed the ready label May 11, 2021
@openjdk openjdk bot added ready and removed csr labels May 18, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 18, 2021

@JaroslavTulach usage: /integrate [auto|manual|<hash>]

@JaroslavTulach
Copy link
Contributor Author

@JaroslavTulach JaroslavTulach commented May 24, 2021

/integrate

@openjdk openjdk bot added the sponsor label May 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 24, 2021

@JaroslavTulach
Your change (at version 48ecf90) is now ready to be sponsored by a Committer.

@jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented May 28, 2021

/sponsor

@openjdk openjdk bot closed this May 28, 2021
@openjdk openjdk bot added integrated and removed sponsor ready labels May 28, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 28, 2021

@jonathan-gibbons @JaroslavTulach Since your change was applied there have been 273 commits pushed to the master branch:

  • 0c9daa7: 8265029: Preserve SIZED characteristics on slice operations (skip, limit)
  • 95b1fa7: 8267529: StringJoiner can create a String that breaks String::equals
  • 7f52c50: 8182043: Access to Windows Large Icons
  • 8a31c07: 8267886: ProblemList javax/management/remote/mandatory/connection/RMIConnector_NPETest.java
  • ae258f1: 8265418: Clean-up redundant null-checks of Class.getPackageName()
  • 41185d3: 8229517: Support for optional asynchronous/buffered logging
  • 7c85f35: 8267123: Remove RMI Activation
  • 0754266: 8267709: Investigate differences between HtmlStyle and stylesheet.css
  • 23189a1: 8191786: Thread-SMR hash table size should be dynamic
  • ef368b3: 8265836: OperatingSystemImpl.getCpuLoad() returns incorrect CPU load inside a container
  • ... and 263 more: https://git.openjdk.java.net/jdk/compare/3af4efdfcfbbb52d38415374083c66c9e7b22604...master

Your commit was automatically rebased without conflicts.

Pushed as commit 6eb9114.

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

@openjdk openjdk bot removed the rfr label May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler integrated
5 participants