Hello Matthias,

Providing these stripped pdb files in the distribution is a good idea, but finding a good solution in the build is unfortunately more complicated than this. The JDK image we ship should (with very few exceptions) be the result of running jlink on all the jmods. If a user runs jlink and includes all the jmods we ship with the JDK, the result should be essentially equivalent to the original JDK image. The way the stripped pdb files are included in the bundles sort of at the last second of the build here breaks this property. Any user generated image would miss the stripped pdb files since they aren't packaged in the jmods.

To properly implement this, care will need to be taken to juggle the two sets of pdb files around, making sure each build and test use case has the correct one in place where and when it's needed. Quite possibly, we cannot cover all use cases with one build configuration. Developers needing the full debug symbols when debugging locally would likely need to disable the stripped symbols so they get the full symbols everywhere. Possibly this would need to be the default for debug builds and configurable for release builds.

/Erik

On 2020-01-17 00:44, Baesken, Matthias wrote:

Hello, please review this change related to stripped/"public" pdb file 
generation on Windows .

Currently the JDK bundle on Windows does not contain pdb files (full pdb files 
are in a separate symbols bundle).
This leads currently to bad native stack traces e.g. when crashes occur.
One reason not to deliver the full pdb files might be the large size of these 
files.

However there exist also "public" or stripped pdb files on Windows, see :

https://docs.microsoft.com/en-us/cpp/build/reference/pdbstripped-strip-private-symbols?view=vs-2017

Those are much smaller (often only 10-20% of the full pdb files) and they offer a good 
compromise (no "file:linenumber" info in the native stacks but at least the 
function name+hex-offset is visible)
to delivering full pdbs in the JDK.

Example sizes for the currently built full pdbs / stripped pdbs from VS2017 
based 64bit build of jdk/jdk :
jvm.pdb : 73,1 MB / 9,46 MB
awt.pdb : 7,05 MB / 1,48 MB

The patch  adds  generation  of stripped  pdb files  to the Windows  build.
Additionally those files are put into the JDK  bundle    (while the symbols 
bundle still gets the full pdb files ) .


Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8237192

http://cr.openjdk.java.net/~mbaesken/webrevs/8237192.0/


Thanks, Matthias

Reply via email to