V(CONS_SYMBOL_TYPE) \
V(CONS_ASCII_SYMBOL_TYPE) \
V(EXTERNAL_SYMBOL_TYPE) \
+ V(EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE) \
V(EXTERNAL_ASCII_SYMBOL_TYPE) \
V(STRING_TYPE) \
V(ASCII_STRING_TYPE) \
V(CONS_STRING_TYPE) \
V(CONS_ASCII_STRING_TYPE) \
V(EXTERNAL_STRING_TYPE) \
+ V(EXTERNAL_STRING_WITH_ASCII_DATA_TYPE) \
V(EXTERNAL_ASCII_STRING_TYPE) \
V(PRIVATE_EXTERNAL_ASCII_STRING_TYPE) \
\
V(MAP_TYPE) \
V(CODE_TYPE) \
- V(JS_GLOBAL_PROPERTY_CELL_TYPE) \
V(ODDBALL_TYPE) \
+ V(JS_GLOBAL_PROPERTY_CELL_TYPE) \
\
V(HEAP_NUMBER_TYPE) \
V(PROXY_TYPE) \
V(EXTERNAL_FLOAT_ARRAY_TYPE) \
V(FILLER_TYPE) \
\
- V(FIXED_ARRAY_TYPE) \
V(ACCESSOR_INFO_TYPE) \
V(ACCESS_CHECK_INFO_TYPE) \
V(INTERCEPTOR_INFO_TYPE) \
- V(SHARED_FUNCTION_INFO_TYPE) \
V(CALL_HANDLER_INFO_TYPE) \
V(FUNCTION_TEMPLATE_INFO_TYPE) \
V(OBJECT_TEMPLATE_INFO_TYPE) \
V(SCRIPT_TYPE) \
V(CODE_CACHE_TYPE) \
\
+ V(FIXED_ARRAY_TYPE) \
+ V(SHARED_FUNCTION_INFO_TYPE) \
+ \
V(JS_VALUE_TYPE) \
V(JS_OBJECT_TYPE) \
V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
-oom_dump extracts useful information from Google Chrome OOM minidumps.
+oom_dump extracts useful information from Google Chrome OOM minidumps.
To build one needs a google-breakpad checkout
(http://code.google.com/p/google-breakpad/).
put a soft link into /usr/lib directory).
Next step is to build v8. Note: you should build x64 version of v8,
-if you're on 64-bit platform, otherwise you would get link error when
+if you're on 64-bit platform, otherwise you would get a link error when
building oom_dump.
The last step is to build oom_dump itself. The following command should work:
cd <v8 working copy>/tools/oom_dump
scons BREAKPAD_DIR=<path to google-breakpad working copy>
-(Additionally you can control v8 working copy dir, but default---../..---
-should work just fine).
+(Additionally you can control v8 working copy dir, but the default should work.)
If everything goes fine, oom_dump <path to minidump> should print
-some useful information about OOM crash.
+some useful information about the OOM crash.
+
+Note: currently only 32-bit Windows minidumps are supported.
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
+#include <algorithm>
+
#include <google_breakpad/processor/minidump.h>
-#include <processor/logging.h>
#define ENABLE_DEBUGGER_SUPPORT
thread_list->GetThreadByID(exception_thread_id);
CHECK(exception_thread);
+ // Currently only 32-bit Windows minidumps are supported.
+ CHECK_EQ(MD_CONTEXT_X86, crash_context->GetContextCPU());
+
const MDRawContextX86* contextX86 = crash_context->GetContextX86();
CHECK(contextX86);
if (value >= esp && value < last) {
u_int32_t value2 = 0;
CHECK(memory_region->GetMemoryAtAddress(value, &value2));
- if (value2 == 0xdecade00) {
+ if (value2 == v8::internal::HeapStats::kStartMarker) {
heap_stats_addr = addr;
break;
}
#define READ_FIELD(offset) \
ReadPointedValue(memory_region, heap_stats_addr, offset)
- CHECK(READ_FIELD(0) == 0xdecade00);
- CHECK(READ_FIELD(23) == 0xdecade01);
+ CHECK(READ_FIELD(0) == v8::internal::HeapStats::kStartMarker);
+ CHECK(READ_FIELD(23) == v8::internal::HeapStats::kEndMarker);
const int new_space_size = READ_FIELD(1);
const int new_space_capacity = READ_FIELD(2);
// Print heap stats.
- printf("exception thread ID: %d (%x)\n",
+ printf("exception thread ID: %" PRIu32 " (%#" PRIx32 ")\n",
exception_thread_id, exception_thread_id);
- printf("heap stats address: %p\n", (void*)heap_stats_addr);
+ printf("heap stats address: %#" PRIx64 "\n", heap_stats_addr);
#define PRINT_INT_STAT(stat) \
printf("\t%-25s\t% 10d\n", #stat ":", stat);
#define PRINT_MB_STAT(stat) \
const char* name = InstanceTypeToString(type);
if (name == NULL) {
// Unknown instance type. Check that there is no objects of that type.
- CHECK(objects_per_type[type] == 0);
- CHECK(size_per_type[type] == 0);
+ CHECK_EQ(0, objects_per_type[type]);
+ CHECK_EQ(0, size_per_type[type]);
continue;
}
int size = size_per_type[type];
running_size += size;
printf("\t%-37s% 9d% 11.3f MB% 10.3f%%% 10.3f%%\n",
name, objects_per_type[type], toM(size),
- 100.*size/total_size, 100.*running_size/total_size);
+ 100. * size / total_size, 100. * running_size / total_size);
}
printf("\t%-37s% 9d% 11.3f MB% 10.3f%%% 10.3f%%\n",
"total", 0, toM(total_size), 100., 100.);
} // namespace
int main(int argc, char **argv) {
- BPLOG_INIT(&argc, &argv);
-
if (argc != 2) {
fprintf(stderr, "usage: %s <minidump>\n", argv[0]);
return 1;