Revision: 5269
Author: [email protected]
Date: Mon Aug 16 04:43:04 2010
Log: Backport http://code.google.com/p/v8/source/detail?r=5261 to 2.2.
Review URL: http://codereview.chromium.org/3177013
http://code.google.com/p/v8/source/detail?r=5269
Modified:
/branches/2.2/src/api.cc
/branches/2.2/src/heap.cc
/branches/2.2/src/heap.h
/branches/2.2/src/platform-nullos.cc
/branches/2.2/src/platform-posix.cc
/branches/2.2/src/platform-win32.cc
/branches/2.2/src/platform.h
/branches/2.2/src/version.cc
=======================================
--- /branches/2.2/src/api.cc Thu Aug 5 11:35:53 2010
+++ /branches/2.2/src/api.cc Mon Aug 16 04:43:04 2010
@@ -174,6 +174,8 @@
heap_stats.objects_per_type = objects_per_type;
int size_per_type[LAST_TYPE + 1] = {0};
heap_stats.size_per_type = size_per_type;
+ int os_error;
+ heap_stats.os_error = &os_error;
int end_marker;
heap_stats.end_marker = &end_marker;
i::Heap::RecordStats(&heap_stats, take_snapshot);
=======================================
--- /branches/2.2/src/heap.cc Thu Aug 5 11:35:53 2010
+++ /branches/2.2/src/heap.cc Mon Aug 16 04:43:04 2010
@@ -4131,6 +4131,7 @@
*stats->memory_allocator_size = MemoryAllocator::Size();
*stats->memory_allocator_capacity =
MemoryAllocator::Size() + MemoryAllocator::Available();
+ *stats->os_error = OS::GetLastError();
if (take_snapshot) {
HeapIterator iterator;
for (HeapObject* obj = iterator.next();
=======================================
--- /branches/2.2/src/heap.h Fri Aug 6 01:35:31 2010
+++ /branches/2.2/src/heap.h Mon Aug 16 04:43:04 2010
@@ -1347,7 +1347,8 @@
int* memory_allocator_capacity; // 20
int* objects_per_type; // 21
int* size_per_type; // 22
- int* end_marker; // 23
+ int* os_error; // 23
+ int* end_marker; // 24
};
=======================================
--- /branches/2.2/src/platform-nullos.cc Wed Nov 18 06:12:51 2009
+++ /branches/2.2/src/platform-nullos.cc Mon Aug 16 04:43:04 2010
@@ -98,6 +98,12 @@
UNIMPLEMENTED();
return 0;
}
+
+
+int OS::GetLastError() {
+ UNIMPLEMENTED();
+ return 0;
+}
// Returns the local time offset in milliseconds east of UTC without
=======================================
--- /branches/2.2/src/platform-posix.cc Wed Feb 3 03:26:59 2010
+++ /branches/2.2/src/platform-posix.cc Mon Aug 16 04:43:04 2010
@@ -106,6 +106,11 @@
if (NULL == t) return nan_value();
return t->tm_isdst > 0 ? 3600 * msPerSecond : 0;
}
+
+
+int OS::GetLastError() {
+ return errno;
+}
//
----------------------------------------------------------------------------
=======================================
--- /branches/2.2/src/platform-win32.cc Wed May 26 06:27:57 2010
+++ /branches/2.2/src/platform-win32.cc Mon Aug 16 04:43:04 2010
@@ -649,6 +649,11 @@
int64_t offset = Time(time).DaylightSavingsOffset();
return static_cast<double>(offset);
}
+
+
+int OS::GetLastError() {
+ return ::GetLastError();
+}
//
----------------------------------------------------------------------------
=======================================
--- /branches/2.2/src/platform.h Wed May 26 06:27:57 2010
+++ /branches/2.2/src/platform.h Mon Aug 16 04:43:04 2010
@@ -165,6 +165,9 @@
// Returns the daylight savings offset for the given time.
static double DaylightSavingsOffset(double time);
+ // Returns last OS error.
+ static int GetLastError();
+
static FILE* FOpen(const char* path, const char* mode);
// Log file open mode is platform-dependent due to line ends issues.
=======================================
--- /branches/2.2/src/version.cc Mon Aug 9 23:39:13 2010
+++ /branches/2.2/src/version.cc Mon Aug 16 04:43:04 2010
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 2
#define MINOR_VERSION 2
#define BUILD_NUMBER 24
-#define PATCH_LEVEL 14
+#define PATCH_LEVEL 15
#define CANDIDATE_VERSION false
// Define SONAME to have the SCons build the put a specific SONAME into the
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev