Review Request: Shark

Christian Thalinger Christian.Thalinger at Sun.COM
Tue Jun 22 01:35:25 PDT 2010


On Fri, 2010-06-11 at 15:16 +0100, Gary Benson wrote:
> Hi all,
> 
> Shark is a JIT compiler for Zero that uses the LLVM compiler
> infrastructure to compile Java methods without introducing
> system-specific code.  This webrev adds Shark support to
> HotSpot:
> 
>   http://cr.openjdk.java.net/~gbenson/shark-hotspot-01/

I only looked at the HotSpot changes since I have no idea about the
Shark stuff.  Everything looks pretty good factored with #ifdefs.

hotspot/src/share/vm/compiler/disassembler.cpp:

+#ifdef SHARK
+  SharkEntry* entry = (SharkEntry *) nm->instructions_begin();
+  unsigned char* p = entry->code_start();
+  unsigned char* end = entry->code_limit();
+#else

Why do you need to stuff a SharkEntry into the address?

hotspot/src/share/vm/runtime/deoptimization.cpp:

+#ifndef SHARK
   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
+#endif // SHARK

Why does this assert not hold?

hotspot/src/share/vm/includeDB_shark:

Still has the old Sun copyright header.

-- Christian



More information about the hotspot-compiler-dev mailing list