Reviewers: ,
Message:
I built v8 snapshot and ran TrackHeapAllocations with the flag and got
crash.
#
# Fatal error in ../src/frames.cc, line 58
# CHECK(frame->sp() <= handler->address()) failed
#
==== C stack trace ===============================
1: V8_Fatal
2:
v8::internal::StackHandlerIterator::StackHandlerIterator(v8::internal::StackFrame
const*, v8::internal::StackHandler*)
3: v8::internal::StackFrameIterator::Advance()
4: v8::internal::JavaScriptFrameIterator::Advance()
5:
v8::internal::JavaScriptFrameIterator::JavaScriptFrameIterator(v8::internal::Isolate*)
6:
v8::internal::StackTraceFrameIterator::StackTraceFrameIterator(v8::internal::Isolate*)
7: v8::internal::AllocationTracker::NewObjectEvent(unsigned char*, int)
8: v8::internal::HeapSnapshotsCollection::NewObjectEvent(unsigned char*,
int)
9: v8::internal::HeapProfiler::NewObjectEvent(unsigned char*, int)
10:
v8::internal::HeapProfiler::RecordObjectAllocationFromMasm(v8::internal::Isolate*,
unsigned char*, int)
11: ??
Trace/breakpoint trap (core dumped)
Description:
AllocationsTracker: introduce heap-profiler-always-track-allocations flag
It gives us a chance to track allocations from start.
Also it gives us ability to create snapshot.cc with enabled allocation
tracking.
BUG=none
Please review this at https://codereview.chromium.org/47713002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -1 lines):
M src/flag-definitions.h
M src/heap-profiler.h
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
aa889f3fd905aa5838a47936ebc1fad4ac272676..9687bad08a2d787f74bd792f5bfea3137ac4f9d9
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -541,6 +541,8 @@ DEFINE_bool(verify_heap, false, "verify heap pointers
before and after GC")
// heap-snapshot-generator.cc
DEFINE_bool(heap_profiler_trace_objects, false,
"Dump heap object allocations/movements/size_updates")
+DEFINE_bool(heap_profiler_always_track_allocations, false,
+ "Always track object allocations")
// v8.cc
Index: src/heap-profiler.h
diff --git a/src/heap-profiler.h b/src/heap-profiler.h
index
74002278d40beb1a23a06523da4d5c6066911c9f..de1c81e8a983ee056c397ec9aa5fa06757477dae
100644
--- a/src/heap-profiler.h
+++ b/src/heap-profiler.h
@@ -84,7 +84,8 @@ class HeapProfiler {
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
bool is_tracking_allocations() {
- return is_tracking_allocations_;
+ return is_tracking_allocations_ ||
+ FLAG_heap_profiler_always_track_allocations;
}
void StartHeapAllocationsRecording();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.