Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: src/heap/heap.cc

Issue 1149623010: Print and save JS stacktrace on OOM crash. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 38968ad0b33b026b2a6087a908044a9026d8c009..ae9718e376269e026c163eeb1524fec98b943fbd 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5366,6 +5366,11 @@ void Heap::RecordStats(HeapStats* stats, bool take_snapshot) {
}
if (stats->last_few_messages != NULL)
GetFromRingBuffer(stats->last_few_messages);
+ if (stats->js_stacktrace != NULL) {
+ FixedStringAllocator fixed(stats->js_stacktrace, kStacktraceBufferSize - 1);
+ StringStream accumulator(&fixed);
+ isolate()->PrintStack(&accumulator, Isolate::kPrintStackVerbose);
+ }
}
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698