Skip to content

Commit

Permalink
more robust stuff, bunch up output and analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Feb 15, 2014
1 parent 908cd2c commit 91f1240
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions moar-gdb.py
Expand Up @@ -537,9 +537,16 @@ def summarize(self):
# automatically?
if len(self.size_histogram) > 1:
print "sizes of objects/stables:"
show_histogram(self.size_histogram, "key", True)
print "REPRs:"
show_histogram(self.repr_histogram)
try:
show_histogram(self.size_histogram, "key", True)
except Exception as e:
print e
if len(self.repr_histogram) >= 1:
print "REPRs:"
try:
show_histogram(self.repr_histogram)
except Exception as e:
print e

class HeapData(object):
run_nursery = None
Expand Down Expand Up @@ -571,9 +578,13 @@ def invoke(self, arg, from_tty):

#nursery_memory.append(nursery)

sizeclass_data = []
for sizeclass in range(MVM_GEN2_BINS):
g2sc = Gen2Data(generation, tc['gen2']['size_classes'][sizeclass], sizeclass)
sizeclass_data.append(g2sc)
g2sc.analyze(tc)

for g2sc in sizeclass_data:
g2sc.summarize()

class DiffHeapCommand(gdb.Command):
Expand Down

0 comments on commit 91f1240

Please sign in to comment.