build crash after extending oopDesc
Thomas Wuerthinger
thomas.wuerthinger at oracle.com
Sun Jun 10 11:23:23 PDT 2012
Extensibility and flexibility are at least main goals of the Graal
project. We are currently doing experiments around removing the
restriction on the JIT by writing the interpreter in Java too. We will
present our results at this year's JVM Language Summit.
- thomas
On 10.06.2012 12:55, Remi Forax wrote:
> I think Graal (the OpenJDK project) is nowadays close to the original
> hotspot in term of hackability even if it's restricted to the JIT.
>
> Rémi
>
> Sent from my Phone
>
> ----- Reply message -----
> From: "John Rose" <john.r.rose at oracle.com>
> To: "Krystal Mok" <rednaxelafx at gmail.com>
> Cc: "hotspot-dev at openjdk.java.net" <hotspot-dev at openjdk.java.net>,
> "Christian Thalinger" <christian.thalinger at oracle.com>
> Subject: build crash after extending oopDesc
> Date: Sat, Jun 9, 2012 09:37
>
>
> On Jun 8, 2012, at 11:51 AM, Krystal Mok wrote:
>
> > David,
> >
> > If this patch [1] resembles your change, then what I saw was that
> the VM would build all right, but would fail running test_gamma right
> at the end of the build process.
> >
> > The problem was caused by arrayOopDesc::length_offset_in_bytes(), as
> noted [2]. test_gamma runs fine if I drop a .hotspotrc file specifying
> -UseCompressedOops in it, which confirms the problem.
>
> Good analysis, Kris.
>
> What happens if you add the extraneous field after the _mark field? I
> think that would be more robust, although there is still likely to be
> a bug tail.
>
> Here's an old war-story: When the original Hotspot team brought their
> prototype to Sun long ago, I was on the technical evaluation team.
> One of my tests was to inject an extra field into class oopDesc.
> (Specifically, the field held a string representation of the thread
> backtrace at the point of the object's allocation. A crude allocation
> profiler!) The system worked with a few edits and no further
> adjustment. This demonstrated to me that the software architecture
> was robust and ready to evolve.
>
> (Things are different now. The system is more than 10x larger. It
> contains multiple platform ports, two good JITs, instrumentation,
> several GCs, and compressed pointers, none of which the prototype had.
> I wish our system were still as malleable as it was when it was
> young, but it's a different engineering problem today.)
>
> — John
>
> diff --git a/src/share/vm/oops/oop.hpp b/src/share/vm/oops/oop.hpp
> --- a/src/share/vm/oops/oop.hpp
> +++ b/src/share/vm/oops/oop.hpp
> @@ -62,6 +62,7 @@
> friend class VMStructs;
> private:
> volatile markOop _mark;
> + intptr_t _extraneous;
> union _metadata {
> wideKlassOop _klass;
> narrowOop _compressed_klass;
>
More information about the hotspot-dev
mailing list