Merging BSDPort into HotSpot mainline

Tom Rodriguez tom.rodriguez at oracle.com
Fri Sep 16 10:35:27 PDT 2011


On Sep 15, 2011, at 5:21 PM, John Rose wrote:

> On Sep 13, 2011, at 3:32 PM, Tom Rodriguez wrote:
> 
>> I've finally prepared a set of changes against the latest hotspot-comp with the bsd-port changes.  They compile on all our supported platforms with the jdk7 and jdk6 tools and I also built on Snow Leopard and incorporated a few extra changes there to make it all compile.  I've prepared several webrevs to ease reviewing.
>> 
>> http://cr.openjdk.java.net/~never/7089790_full
> 
> I tried this out with a build and JSR 292 test on my Macbook (10.6.8) and it works.

Thanks.

> 
> I ran the diffs from your changes against the transitional patch currently in mvm-dev, and they don't contain anything surprising (relative to this Email thread).
> 
> The PRIxnn macro simplifications are good.  Perhaps the final form of them in globalDefinitions could be reorganized a little, also?  The parallel 32-bit and 64-bit definitions occur in different order and with different spacing.  This irregularity makes them harder to read.

You mean the grouping?  How about this?  I also simplified the pointer comment.

// Format 32-bit quantities.                                                                                                                          
#define INT32_FORMAT           "%" PRId32
#define UINT32_FORMAT          "%" PRIu32
#define INT32_FORMAT_W(width)  "%" #width PRId32
#define UINT32_FORMAT_W(width) "%" #width PRIu32

#define PTR32_FORMAT           "0x%08" PRIx32

// Format 64-bit quantities.                                                                                                                          
#define INT64_FORMAT           "%" PRId64
#define UINT64_FORMAT          "%" PRIu64
#define INT64_FORMAT_W(width)  "%" #width PRId64
#define UINT64_FORMAT_W(width) "%" #width PRIu64

#define PTR64_FORMAT           "0x%016" PRIx64

// Format pointers which change size between 32- and 64-bit.                                                                                          
#ifdef  _LP64
#define INTPTR_FORMAT "0x%016" PRIxPTR
#define PTR_FORMAT    "0x%016" PRIxPTR
#else   // !_LP64                                                                                                                                    
#define INTPTR_FORMAT "0x%08"  PRIxPTR
#define PTR_FORMAT    "0x%08"  PRIxPTR
#endif  // _LP64                                                                                                                                      

#define SSIZE_FORMAT          "%" PRIdPTR
#define SIZE_FORMAT           "%" PRIuPTR
#define SSIZE_FORMAT_W(width) "%" #width PRIdPTR
#define SIZE_FORMAT_W(width)  "%" #width PRIuPTR

#define UINTX_FORMAT          "%" PRIuPTR
#define INTX_FORMAT           "%" PRIdPTR
#define UINTX_FORMAT_W(width) "%" #width PRIuPTR

> 
> I looked at the helpful differences you posted between Linux and BSD.  I noticed that there is a definition (bsd_{x86,zero}) of SurvivorRatio introduced which apparently reproduces the definition in the shared globals.hpp, and is not in the linux side.  Do we need it?

It seems useless since SurvivorRatio isn't product_pd.  I'll remove it.

Thanks!

tom

> 
> Thanks.  This convergence of source bases is very welcome to all of us mac-heads.
> 
> -- John
> 
> P.S.  I noticed something that needs cleanup later on.  There are 8 replacements of this form, which all protect elf-specific code:
> -#ifndef _WINDOWS
> +#if !defined(_WINDOWS) && !defined(__APPLE__)
> 
> At minimum it probably requires something like TARGET_OS_OBJECT_elf, and more likely a move of the code into src/os/elf or some similar platform-specific code base.  This is not neatly covered by the linux/bsd merge, since elf is one of the ways in which linux and bsd differ.
> 



More information about the hotspot-dev mailing list