Version 1.2.5.

Fixed bug in initial boundary check for Boyer-Moore text search (issue 349).

Fixed compilation issues with MinGW and gcc 4.3+ and added support for armv7 and cortex-a8 architectures.  Patches by Lei Zhang and Craig Schlenter.

Added a script cache to the debugger.

Optimized compilation performance by improving internal data structures and avoiding expensive property load optimizations for code that's infrequently executed.

Exposed the calling JavaScript context through the static API function Context::GetCalling().


git-svn-id: http://v8.googlecode.com/svn/trunk@2050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/spaces.cc b/src/spaces.cc
index ee801cb..e61c6ad 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -31,7 +31,8 @@
 #include "mark-compact.h"
 #include "platform.h"
 
-namespace v8 { namespace internal {
+namespace v8 {
+namespace internal {
 
 // For contiguous spaces, top should be in the space (or at the end) and limit
 // should be the end of the space.
@@ -2422,6 +2423,13 @@
 void LargeObjectSpace::IterateRSet(ObjectSlotCallback copy_object_func) {
   ASSERT(Page::is_rset_in_use());
 
+  static void* lo_rset_histogram = StatsTable::CreateHistogram(
+      "V8.RSetLO",
+      0,
+      // Keeping this histogram's buckets the same as the paged space histogram.
+      Page::kObjectAreaSize / kPointerSize,
+      30);
+
   LargeObjectIterator it(this);
   while (it.has_next()) {
     // We only have code, sequential strings, or fixed arrays in large
@@ -2432,15 +2440,18 @@
       // Iterate the normal page remembered set range.
       Page* page = Page::FromAddress(object->address());
       Address object_end = object->address() + object->Size();
-      Heap::IterateRSetRange(page->ObjectAreaStart(),
-                             Min(page->ObjectAreaEnd(), object_end),
-                             page->RSetStart(),
-                             copy_object_func);
+      int count = Heap::IterateRSetRange(page->ObjectAreaStart(),
+                                         Min(page->ObjectAreaEnd(), object_end),
+                                         page->RSetStart(),
+                                         copy_object_func);
 
       // Iterate the extra array elements.
       if (object_end > page->ObjectAreaEnd()) {
-        Heap::IterateRSetRange(page->ObjectAreaEnd(), object_end,
-                               object_end, copy_object_func);
+        count += Heap::IterateRSetRange(page->ObjectAreaEnd(), object_end,
+                                        object_end, copy_object_func);
+      }
+      if (lo_rset_histogram != NULL) {
+        StatsTable::AddHistogramSample(lo_rset_histogram, count);
       }
     }
   }