[tools] Fix frame marker printing on x64 in grokdump.py
Change-Id: I744d6ffca3747c166e8de194c2a7196b46b73f45 NOTRY=true Change-Id: I744d6ffca3747c166e8de194c2a7196b46b73f45 Reviewed-on: https://chromium-review.googlesource.com/493748 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#45061}
This commit is contained in:
parent
cedc6ccf61
commit
0f2106469c
@ -1952,9 +1952,12 @@ class InspectionPadawan(object):
|
||||
return None
|
||||
|
||||
def FrameMarkerName(self, value):
|
||||
if 0 < value <= len(FRAME_MARKERS):
|
||||
return "Possibly %s frame marker" % FRAME_MARKERS[value-1]
|
||||
return ""
|
||||
# The frame marker is Smi-tagged but not Smi encoded and 0 is not a valid
|
||||
# frame type.
|
||||
value = (value >> 1) - 1
|
||||
if 0 <= value < len(FRAME_MARKERS):
|
||||
return "Possibly %s frame marker" % FRAME_MARKERS[value]
|
||||
return None
|
||||
|
||||
def IsFrameMarker(self, slot, address):
|
||||
if not slot: return False
|
||||
@ -1964,18 +1967,17 @@ class InspectionPadawan(object):
|
||||
next_address = self.reader.ReadUIntPtr(slot + self.reader.PointerSize())
|
||||
return self.reader.IsExceptionStackAddress(next_address)
|
||||
|
||||
def FormatSmi(self, address, slot=None):
|
||||
def FormatSmi(self, address):
|
||||
value = self.heap.SmiUntag(address)
|
||||
marker = ""
|
||||
if self.IsFrameMarker(slot, address):
|
||||
marker = self.FrameMarkerName(value)
|
||||
# On 32-bit systems almost everything looks like a Smi.
|
||||
if not self.reader.Is64() or value == 0: return marker
|
||||
return "Smi(%d) %s" % (value, marker)
|
||||
if not self.reader.Is64() or value == 0: return None
|
||||
return "Smi(%d)" % value
|
||||
|
||||
def SenseObject(self, address, slot=None):
|
||||
if self.IsFrameMarker(slot, address):
|
||||
return self.FrameMarkerName(address)
|
||||
if self.heap.IsSmi(address):
|
||||
return self.FormatSmi(address, slot)
|
||||
return self.FormatSmi(address)
|
||||
if not self.heap.IsTaggedAddress(address): return None
|
||||
tagged_address = address
|
||||
if self.IsInKnownOldSpace(tagged_address):
|
||||
|
Loading…
Reference in New Issue
Block a user