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

Unified Diff: tools/grokdump.py

Issue 1142343009: grokdump.py - some support for on-stack HeapStats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grokdump.py
diff --git a/tools/grokdump.py b/tools/grokdump.py
index 26e53c785413bd0b0c1a860f240c132d724e804b..b63690ce3a3a9c69ffc8b4a88ccb5379b172904d 100755
--- a/tools/grokdump.py
+++ b/tools/grokdump.py
@@ -3115,20 +3115,38 @@ def AnalyzeMinidump(options, minidump_name):
elif not options.command:
if reader.exception is not None:
frame_pointer = reader.ExceptionFP()
+ in_oom_dump_area = False
print "Annotated stack (from exception.esp to bottom):"
for slot in xrange(stack_top, stack_bottom, reader.PointerSize()):
ascii_content = [c if c >= '\x20' and c < '\x7f' else '.'
for c in reader.ReadBytes(slot, reader.PointerSize())]
maybe_address = reader.ReadUIntPtr(slot)
+ maybe_address_contents = None
+ if maybe_address >= stack_top and maybe_address <= stack_bottom:
+ maybe_address_contents = reader.ReadUIntPtr(maybe_address)
+ if maybe_address_contents == 0xdecade00:
+ in_oom_dump_area = True
heap_object = heap.FindObject(maybe_address)
maybe_symbol = reader.FindSymbol(maybe_address)
+ oom_comment = ""
+ if in_oom_dump_area:
+ if maybe_address_contents == 0xdecade00:
+ oom_comment = " <----- HeapStats start marker"
+ elif maybe_address_contents == 0xdecade01:
+ oom_comment = " <----- HeapStats end marker"
+ else:
+ oom_comment = " %d (%d Mbytes)" % (maybe_address_contents,
+ maybe_address_contents >> 20)
if slot == frame_pointer:
maybe_symbol = "<---- frame pointer"
frame_pointer = maybe_address
- print "%s: %s %s %s" % (reader.FormatIntPtr(slot),
- reader.FormatIntPtr(maybe_address),
- "".join(ascii_content),
- maybe_symbol or "")
+ print "%s: %s %s %s%s" % (reader.FormatIntPtr(slot),
+ reader.FormatIntPtr(maybe_address),
+ "".join(ascii_content),
+ maybe_symbol or "",
+ oom_comment)
+ if maybe_address_contents == 0xdecade01:
+ in_oom_dump_area = False
if heap_object:
heap_object.Print(Printer())
print
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698