fastdebug vs jvmg
Kelly O'Hair
kelly.ohair at oracle.com
Wed Dec 5 14:25:32 PST 2012
On Oct 31, 2012, at 5:26 AM, Jesper Wilhelmsson wrote:
> Hi,
>
> Last week I pulled build-infra/jdk8 from openjdk and I have a few questions and comments.
>
> First I did as I have done before:
> cd common/makefiles
> sh ../autoconf/configure
>
> And got: "This script needs bash to run.
> It is recommended to use the configure script in the source tree root instead."
>
> Configure from the root directory, nice! :-)
>
> When configured I tried "make images" but the target was not recognized when I tried to build in the root directory. I went back to common/makefiles and ran 'make images' there which worked as expected.
At the top level, you would need to use "make NEWBUILD=true images" right now.
The top Makefile still defaults to the old builds.
>
> *Question:* Is it just the target 'images' that won't work in the root or are we still supposed to build from the common/makefiles directory? Building from the root would be really nice.
>
The plan is for you to build from root, but as long we we have to support old and new builds, this is tricky.
>
> Then I reconfigured with --enable-debug.
>
> --enable-debug currently configures hotspot to build with the build target fastdebug. fastdebug isn't really fast since asserts are turned on, and it can't be used for debugging since the code is optimized, so the name is a bit misleading. Personally I always use jvmg when debugging and testing.
But the debug build has asserts on too, doesn't it? It should.
>
> I asked around the Stockholm office and it seems as most people here would prefer jvmg. It seems as jvmg is very slow on Mac so those who work on Mac only uses jvmg when debugging for real, not for regular testing, but otherwise fastdebug is rarely used here.
A long time ago, in a land far far away, fastdebug was pretty good on Solaris, using dbx, worked really well, not perfect but pretty good.
Since then, Linux was added, and gdb is needed, and Mac too, so we have many native code debuggers to deal with now.
Also since then, machines have gotten faster, and disks are fatter and faster, and maybe fastdebug has lost it's benefit.
Testing the debug build is pretty impossible, or was, it just was way too slow, maybe 100x slower than a product build.
But fastdebug was possible, maybe 10x slower than a product build.
So I have always assumed that fastdebug was faster than a debug build.
But who knows what the performance is now. I think I was always looking at an entire JDK built with product vs. debug vs. fastdebug
not just hotspot, although hotspot was usually the piece that cause performance issues.
If all this has changed, then we should re-consider what we build and test.
I think it was always agreed that the asserts were invaluable, so we need to keep that on in some build.
-kto
>
> Cheers,
> /Jesper
>
More information about the build-infra-dev
mailing list