Discussion:
Unused DEBUG_CLASSFILES variable in makefiles
Omair Majid
2014-10-10 16:52:03 UTC
Permalink
Hi,

The DEBUG_CLASSFILES variable seems to be completely unused but still defined
in the makefiles in jdk9 and jdk8u.

$ grep -rn DEBUG_CLASSFILES
Binary file jaxp/.hg/store/data/make/_makefile.i matches
Binary file jaxws/.hg/store/data/make/_makefile.i matches
build/config.status:876:S["DEBUG_CLASSFILES"]="false"
build/config.log:1391:DEBUG_CLASSFILES='false'
build/hotspot-spec.gmk:45:DEBUG_CLASSFILES:=false
common/autoconf/jdk-options.m4:219: DEBUG_CLASSFILES="false"
common/autoconf/jdk-options.m4:227: DEBUG_CLASSFILES="true"
common/autoconf/jdk-options.m4:235: DEBUG_CLASSFILES="true"
common/autoconf/jdk-options.m4:243: DEBUG_CLASSFILES="false"
common/autoconf/jdk-options.m4:315: AC_SUBST(DEBUG_CLASSFILES)
common/autoconf/generated-configure.sh:884:DEBUG_CLASSFILES
common/autoconf/generated-configure.sh:14627: DEBUG_CLASSFILES="false"
common/autoconf/generated-configure.sh:14635: DEBUG_CLASSFILES="true"
common/autoconf/generated-configure.sh:14643: DEBUG_CLASSFILES="true"
common/autoconf/generated-configure.sh:14651: DEBUG_CLASSFILES="false"
common/autoconf/hotspot-spec.gmk.in:45:DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@

In Fedora builds of OpenJDK 7, we used to set this to compile javacode
with the -g flag. The new build, through SetupJavaCompilation,
completely ignores this flag (looks like "JAVAC_FLAGS" controls this
now). Would it be worth it to bring back DEBUG_CLASSFILES flag? Or should
it be completely removed?

On a slightly related note, what do people think about adding a new
"DEBUG_LEVEL" that is basically the same as release, except it sets
DEBUG_BINARIES and DEBUG_CLASSFILES/JAVAC_FLAGS to get all debug info?

Thanks,
Omair
--
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
Erik Joelsson
2014-10-13 08:57:56 UTC
Permalink
Hello,
Post by Omair Majid
Hi,
The DEBUG_CLASSFILES variable seems to be completely unused but still defined
in the makefiles in jdk9 and jdk8u.
$ grep -rn DEBUG_CLASSFILES
Binary file jaxp/.hg/store/data/make/_makefile.i matches
Binary file jaxws/.hg/store/data/make/_makefile.i matches
build/config.status:876:S["DEBUG_CLASSFILES"]="false"
build/config.log:1391:DEBUG_CLASSFILES='false'
build/hotspot-spec.gmk:45:DEBUG_CLASSFILES:=false
common/autoconf/jdk-options.m4:219: DEBUG_CLASSFILES="false"
common/autoconf/jdk-options.m4:227: DEBUG_CLASSFILES="true"
common/autoconf/jdk-options.m4:235: DEBUG_CLASSFILES="true"
common/autoconf/jdk-options.m4:243: DEBUG_CLASSFILES="false"
common/autoconf/jdk-options.m4:315: AC_SUBST(DEBUG_CLASSFILES)
common/autoconf/generated-configure.sh:884:DEBUG_CLASSFILES
common/autoconf/generated-configure.sh:14627: DEBUG_CLASSFILES="false"
common/autoconf/generated-configure.sh:14635: DEBUG_CLASSFILES="true"
common/autoconf/generated-configure.sh:14643: DEBUG_CLASSFILES="true"
common/autoconf/generated-configure.sh:14651: DEBUG_CLASSFILES="false"
I think it's still used by the hotspot makefiles (sa-jdi.jar). Seems
weird that we still set it in configure but then ignore the value in the
jdk build. I would vote for resurrecting the option.
Post by Omair Majid
In Fedora builds of OpenJDK 7, we used to set this to compile javacode
with the -g flag. The new build, through SetupJavaCompilation,
completely ignores this flag (looks like "JAVAC_FLAGS" controls this
now). Would it be worth it to bring back DEBUG_CLASSFILES flag? Or should
it be completely removed?
On a slightly related note, what do people think about adding a new
"DEBUG_LEVEL" that is basically the same as release, except it sets
DEBUG_BINARIES and DEBUG_CLASSFILES/JAVAC_FLAGS to get all debug info?
I'm not sure if even more debug levels is the right way to go. It seems
hard to name and that probably means it will be hard to understand.
Perhaps completely separating native debug level and java debug level
would make more sense?

/Erik
Post by Omair Majid
Thanks,
Omair
Magnus Ihse Bursie
2014-10-13 12:02:08 UTC
Permalink
Post by Erik Joelsson
I think it's still used by the hotspot makefiles (sa-jdi.jar). Seems
weird that we still set it in configure but then ignore the value in
the jdk build. I would vote for resurrecting the option.
[...]
Post by Erik Joelsson
I'm not sure if even more debug levels is the right way to go. It
seems hard to name and that probably means it will be hard to
understand. Perhaps completely separating native debug level and java
debug level would make more sense?
I'm not sure "resurrecting" (which actually means adding functionality
which has been gone for quite some time now) is good, since it adds to
the complexity.

However, there have been recurring requests of having more control of
debug vs release builds, and I think we need to address them in some
way. As you say, one dimension is asking wether java or native (or both)
should be compiled as debug. Another typical request is to separate
hotspot debug level from the rest of the JDK (this goes both ways).
Also, debugging can come in several "levels", depending on what tradeoff
between speed/similarity to release vs amount of debug support you need.

Maybe it should be possible to set debugging level per module?

/Magnus

Loading...