changeset 607:d8c7fa77a6dc

Merge
author kvn
date Tue, 03 Mar 2009 10:34:22 -0800
parents 1fa16c3565be (diff) 19962e74284f (current diff)
children 3db67f76d308 19f25e603e7b
files src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
diffstat 8 files changed, 25 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Mar 01 20:49:46 2009 -0800
+++ b/.hgtags	Tue Mar 03 10:34:22 2009 -0800
@@ -20,3 +20,5 @@
 fc6a5ae3fef5ebacfa896dbb3ae37715e388e282 jdk7-b43
 809e899c638bd9b21836abf9d09ab2a30ff3900b jdk7-b44
 945bf754069766e76873c53102fae48abf04cf5b jdk7-b45
+16bb38eeda35b46268eefa4c1f829eb086e0ca46 jdk7-b46
+fcb923bad68e2b10380a030ea83a723f4dc3d4d6 jdk7-b47
--- a/make/hotspot_version	Sun Mar 01 20:49:46 2009 -0800
+++ b/make/hotspot_version	Tue Mar 03 10:34:22 2009 -0800
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=15
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=01
+HS_BUILD_NUMBER=02
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/make/linux/makefiles/gcc.make	Sun Mar 01 20:49:46 2009 -0800
+++ b/make/linux/makefiles/gcc.make	Tue Mar 03 10:34:22 2009 -0800
@@ -131,6 +131,14 @@
 # Enable linker optimization
 LFLAGS += -Xlinker -O1
 
+# If this is a --hash-style=gnu system, use --hash-style=both
+#   The gnu .hash section won't work on some Linux systems like SuSE 10.
+_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
+ifneq ($(_HAS_HASH_STYLE_GNU),)
+  LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+endif
+LFLAGS += $(LDFLAGS_HASH_STYLE)
+
 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
 MAPFLAG = -Xlinker --version-script=FILENAME
 
--- a/src/share/tools/MakeDeps/BuildConfig.java	Sun Mar 01 20:49:46 2009 -0800
+++ b/src/share/tools/MakeDeps/BuildConfig.java	Tue Mar 03 10:34:22 2009 -0800
@@ -247,6 +247,7 @@
         sysDefines.add("HOTSPOT_BUILD_USER="+System.getProperty("user.name"));
         sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\"");
         sysDefines.add("_JNI_IMPLEMENTATION_");
+        sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i486\\\"");
 
         sysDefines.addAll(defines);
 
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Sun Mar 01 20:49:46 2009 -0800
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Mar 03 10:34:22 2009 -0800
@@ -2626,9 +2626,8 @@
 #endif // SCAN_ONLY_VERBOSE
 
     double end_time_sec = os::elapsedTime();
-    if (!evacuation_failed()) {
-      g1_policy()->record_pause_time((end_time_sec - start_time_sec)*1000.0);
-    }
+    double pause_time_ms = (end_time_sec - start_time_sec) * MILLIUNITS;
+    g1_policy()->record_pause_time_ms(pause_time_ms);
     GCOverheadReporter::recordSTWEnd(end_time_sec);
     g1_policy()->record_collection_pause_end(popular_region != NULL,
                                              abandoned);
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Sun Mar 01 20:49:46 2009 -0800
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Tue Mar 03 10:34:22 2009 -0800
@@ -1014,7 +1014,7 @@
 
   _all_full_gc_times_ms->add(full_gc_time_ms);
 
-  update_recent_gc_times(end_sec, full_gc_time_sec);
+  update_recent_gc_times(end_sec, full_gc_time_ms);
 
   _g1->clear_full_collection();
 
@@ -1475,6 +1475,7 @@
   size_t cur_used_bytes = _g1->used();
   assert(cur_used_bytes == _g1->recalculate_used(), "It should!");
   bool last_pause_included_initial_mark = false;
+  bool update_stats = !abandoned && !_g1->evacuation_failed();
 
 #ifndef PRODUCT
   if (G1YoungSurvRateVerbose) {
@@ -1535,7 +1536,7 @@
 
   _n_pauses++;
 
-  if (!abandoned) {
+  if (update_stats) {
     _recent_CH_strong_roots_times_ms->add(_cur_CH_strong_roots_dur_ms);
     _recent_G1_strong_roots_times_ms->add(_cur_G1_strong_roots_dur_ms);
     _recent_evac_times_ms->add(evac_ms);
@@ -1636,7 +1637,7 @@
   double termination_time = avg_value(_par_last_termination_times_ms);
 
   double parallel_other_time;
-  if (!abandoned) {
+  if (update_stats) {
     MainBodySummary* body_summary = summary->main_body_summary();
     guarantee(body_summary != NULL, "should not be null!");
 
@@ -1852,7 +1853,7 @@
 
   // <NEW PREDICTION>
 
-  if (!popular && !abandoned) {
+  if (!popular && update_stats) {
     double pause_time_ms = elapsed_ms;
 
     size_t diff = 0;
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Sun Mar 01 20:49:46 2009 -0800
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp	Tue Mar 03 10:34:22 2009 -0800
@@ -966,7 +966,7 @@
     record_termination_time(0, ms);
   }
 
-  void record_pause_time(double ms) {
+  void record_pause_time_ms(double ms) {
     _last_pause_time_ms = ms;
   }
 
--- a/src/share/vm/utilities/growableArray.cpp	Sun Mar 01 20:49:46 2009 -0800
+++ b/src/share/vm/utilities/growableArray.cpp	Tue Mar 03 10:34:22 2009 -0800
@@ -43,11 +43,13 @@
 #endif
 
 void* GenericGrowableArray::raw_allocate(int elementSize) {
+  assert(_max >= 0, "integer overflow");
+  size_t byte_size = elementSize * (size_t) _max;
   if (on_stack()) {
-    return (void*)resource_allocate_bytes(elementSize * _max);
+    return (void*)resource_allocate_bytes(byte_size);
   } else if (on_C_heap()) {
-    return (void*)AllocateHeap(elementSize * _max, "GrET in " __FILE__);
+    return (void*)AllocateHeap(byte_size, "GrET in " __FILE__);
   } else {
-    return _arena->Amalloc(elementSize * _max);
+    return _arena->Amalloc(byte_size);
   }
 }