Skip to content

Instantly share code, notes, and snippets.

@rr-codes
Last active August 5, 2020 15:14
Show Gist options
  • Select an option

  • Save rr-codes/679fb4bd5f2b9fe6049b893dcda57378 to your computer and use it in GitHub Desktop.

Select an option

Save rr-codes/679fb4bd5f2b9fe6049b893dcda57378 to your computer and use it in GitHub Desktop.
main.py --mode memory --suffix "Desktop" --output [some/output/folder] [some/input/folder]
import argparse
import os
import pandas
import regex as regex
from matplotlib import pyplot
colors = ['tab:purple', 'tab:blue']
def convert_to_csv(source: str, dest: str):
"""
Parses a Valgrind Massif output file and converts it into a CSV file, with `time, heap`, and `stack` column headers.
Rows which have any field equal to 0 are removed.
"""
print(f"-> Parsing {source}...", end='')
with open(source, mode='r') as f:
text = f.read()
with open(dest, mode='w') as out:
out.write("time,heap,stack\n")
for match in regex.finditer(text):
(time, heap, _, stack) = match.groups()
out.write(f"{time},{heap},{stack}\n")
out.write("\n")
print(" Done")
def memory_plot_builder(data: str, ax: pyplot.Axes):
convert_to_csv(data, data + ".csv")
df = pandas.read_csv(data + ".csv", header=0)
for color, label in zip(colors, ['heap', 'stack']):
ax.axhline(y=df[label].median(), color='0.75')
ax.plot(df['time'], df[label], label=label, color=color)
ax.set_yscale('log')
ax.set_ylabel("bytes allocated")
ax.set_xlabel("time (bytes)")
def performance_plot_builder(data: str, ax: pyplot.Axes):
df = pandas.read_csv(data, header=0, sep=';')
df[['library', 'function']] = df.name.str.split('_', expand=True, n=1)
df = df.pivot('function', 'library', 'elapsed')
normalized = df.div(df.max(axis=1), axis=0)
normalized.plot(ax=ax, kind='bar', color=colors)
for v, p in zip(df['etl'].append(df['stl']), ax.patches):
x = p.get_x() + 0.18 * p.get_width()
y = p.get_height() - 0.175
ax.text(x=x, y=y, s=f'{v:.1E}', rotation=90, color='0.75')
ax.set_ylabel('execution time (normalized)')
def parse_args() -> dict:
parser = argparse.ArgumentParser()
parser.add_argument('--mode', choices=['performance', 'memory'], required=True)
parser.add_argument('input')
parser.add_argument('--suffix', default='')
parser.add_argument('--output', required=True)
return vars(parser.parse_args())
args = parse_args()
for base in os.listdir(args['input']):
if 'csv' not in base:
continue
path = args['input'] + '/' + base
fig, axes = pyplot.subplots(figsize=(11, 5))
if args['mode'] == 'performance':
performance_plot_builder(path, axes)
elif args['mode'] == 'memory':
memory_plot_builder(path, axes)
axes.legend(loc='lower left')
axes.set_title(base + ' ' + args['suffix'])
axes.set_xticklabels(axes.get_xticklabels(), rotation=45, ha='right')
pyplot.tight_layout()
out = f"{args['output']}/{base}.png"
fig.savefig(out, dpi=300)
print('-> ' + out)
import argparse
import os
import pandas
def parse_args() -> dict:
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--output', required=True)
return vars(parser.parse_args())
args = parse_args()
for base in os.listdir(args['input']):
if 'csv' not in base:
continue
path = args['input'] + '/' + base
df = pandas.read_csv(path, header=0, sep=';')
df[['library', 'function']] = df.name.str.split('_', expand=True, n=1)
df = df.pivot('function', 'library', 'elapsed')
df.to_csv(args['output'] + '/' + base)
desc: --massif-out-file=state_machine_new.txt --time-unit=B --stacks=yes
cmd: ./untitled6
time_unit: B
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
heap_tree=empty
#-----------
snapshot=1
#-----------
time=124408
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=4160
heap_tree=empty
#-----------
snapshot=2
#-----------
time=277716
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=3
#-----------
time=391560
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=4
#-----------
time=480780
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=5
#-----------
time=603628
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=6
#-----------
time=780132
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=7
#-----------
time=898640
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=8
#-----------
time=998948
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=9
#-----------
time=1126656
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=10
#-----------
time=1291304
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=11
#-----------
time=1410840
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=12
#-----------
time=1546476
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=732
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=13
#-----------
time=1606184
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=14
#-----------
time=1725632
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=15
#-----------
time=1845072
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=368
heap_tree=detailed
n2: 20228 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 4 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=16
#-----------
time=1927196
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=17
#-----------
time=2091432
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=18
#-----------
time=2228288
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=19
#-----------
time=2337784
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=20
#-----------
time=2419912
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=21
#-----------
time=2529404
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=22
#-----------
time=2693640
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=23
#-----------
time=2830496
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=24
#-----------
time=2939992
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=detailed
n2: 20228 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 4 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=25
#-----------
time=3022120
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=26
#-----------
time=3131612
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=27
#-----------
time=3303288
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=472
heap_tree=empty
#-----------
snapshot=28
#-----------
time=3392856
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=456
heap_tree=empty
#-----------
snapshot=29
#-----------
time=3482408
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=30
#-----------
time=3571968
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=31
#-----------
time=3661544
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=408
heap_tree=detailed
n2: 20228 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 4 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=32
#-----------
time=3751096
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=33
#-----------
time=3885448
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=34
#-----------
time=3975000
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=408
heap_tree=empty
#-----------
snapshot=35
#-----------
time=4064572
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=36
#-----------
time=4154136
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=37
#-----------
time=4243688
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=456
heap_tree=empty
#-----------
snapshot=38
#-----------
time=4333256
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=39
#-----------
time=4467592
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=40
#-----------
time=4557152
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=detailed
n2: 20232 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 8 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=41
#-----------
time=4646728
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=408
heap_tree=empty
#-----------
snapshot=42
#-----------
time=4736280
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=43
#-----------
time=4870632
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=44
#-----------
time=4960184
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=408
heap_tree=empty
#-----------
snapshot=45
#-----------
time=5049756
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=46
#-----------
time=5139320
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=47
#-----------
time=5228872
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=456
heap_tree=empty
#-----------
snapshot=48
#-----------
time=5318440
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=49
#-----------
time=5452776
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=detailed
n2: 20228 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 4 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=50
#-----------
time=5512484
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=460
heap_tree=empty
#-----------
snapshot=51
#-----------
time=5572192
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=52
#-----------
time=5631912
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=408
heap_tree=empty
#-----------
snapshot=53
#-----------
time=5691624
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=54
#-----------
time=5751332
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=55
#-----------
time=5811044
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=428
heap_tree=empty
#-----------
snapshot=56
#-----------
time=5870776
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=456
heap_tree=empty
#-----------
snapshot=57
#-----------
time=5930492
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=58
#-----------
time=5990200
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=59
#-----------
time=6049912
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=440
heap_tree=detailed
n2: 20232 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 8 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=60
#-----------
time=6109644
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=420
heap_tree=empty
#-----------
snapshot=61
#-----------
time=6169352
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=376
heap_tree=empty
#-----------
snapshot=62
#-----------
time=6229064
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=63
#-----------
time=6288772
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=460
heap_tree=empty
#-----------
snapshot=64
#-----------
time=6348480
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=416
heap_tree=empty
#-----------
snapshot=65
#-----------
time=6408200
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=408
heap_tree=empty
#-----------
snapshot=66
#-----------
time=6467912
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=67
#-----------
time=6527620
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=68
#-----------
time=6587332
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=428
heap_tree=empty
#-----------
snapshot=69
#-----------
time=6647064
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=456
heap_tree=detailed
n2: 20228 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 4 in 6 places, all below massif's threshold (01.00%)
#-----------
snapshot=70
#-----------
time=6706780
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=388
heap_tree=empty
#-----------
snapshot=71
#-----------
time=6766488
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=488
heap_tree=empty
#-----------
snapshot=72
#-----------
time=6826200
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=440
heap_tree=empty
#-----------
snapshot=73
#-----------
time=6885932
mem_heap_B=20232
mem_heap_extra_B=32
mem_stacks_B=420
heap_tree=empty
#-----------
snapshot=74
#-----------
time=6945640
mem_heap_B=20228
mem_heap_extra_B=20
mem_stacks_B=376
heap_tree=empty
#-----------
snapshot=75
#-----------
time=6994556
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=956
heap_tree=peak
n2: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
n0: 0 in 6 places, all below massif's threshold (01.00%)
desc: --massif-out-file=state_machine_old.txt --time-unit=B --stacks=yes
cmd: ./untitled6
time_unit: B
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
heap_tree=empty
#-----------
snapshot=1
#-----------
time=27168
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=7016
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=2
#-----------
time=69724
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1780
heap_tree=empty
#-----------
snapshot=3
#-----------
time=94072
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=4328
heap_tree=empty
#-----------
snapshot=4
#-----------
time=131848
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=4160
heap_tree=empty
#-----------
snapshot=5
#-----------
time=162248
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=5936
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=6
#-----------
time=185196
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=2380
heap_tree=empty
#-----------
snapshot=7
#-----------
time=213668
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=8
#-----------
time=255852
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=9
#-----------
time=280392
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=10
#-----------
time=312912
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=11
#-----------
time=334640
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1072
heap_tree=empty
#-----------
snapshot=12
#-----------
time=367088
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=13
#-----------
time=402928
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=14
#-----------
time=423820
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=15
#-----------
time=457192
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=16
#-----------
time=478064
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1072
heap_tree=empty
#-----------
snapshot=17
#-----------
time=523816
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1072
heap_tree=empty
#-----------
snapshot=18
#-----------
time=561172
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=19
#-----------
time=594288
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=20
#-----------
time=643264
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=21
#-----------
time=675972
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=22
#-----------
time=716828
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=23
#-----------
time=766020
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=24
#-----------
time=798696
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=25
#-----------
time=839620
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=26
#-----------
time=872284
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=27
#-----------
time=904888
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=28
#-----------
time=937456
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=29
#-----------
time=970232
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=30
#-----------
time=994756
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=31
#-----------
time=1032536
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=32
#-----------
time=1057792
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=33
#-----------
time=1108140
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=34
#-----------
time=1133352
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=35
#-----------
time=1158584
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=36
#-----------
time=1196328
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=37
#-----------
time=1221544
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=38
#-----------
time=1246772
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=39
#-----------
time=1297060
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=40
#-----------
time=1322288
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=41
#-----------
time=1360096
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=42
#-----------
time=1385384
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=43
#-----------
time=1435708
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1060
heap_tree=empty
#-----------
snapshot=44
#-----------
time=1460908
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=45
#-----------
time=1486136
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=46
#-----------
time=1511360
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=47
#-----------
time=1543308
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=836
heap_tree=peak
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=48
#-----------
time=1568456
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=49
#-----------
time=1606184
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=50
#-----------
time=1627060
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=51
#-----------
time=1647932
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=52
#-----------
time=1668808
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=53
#-----------
time=1689684
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=54
#-----------
time=1710556
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=55
#-----------
time=1731432
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=56
#-----------
time=1752308
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=57
#-----------
time=1773180
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=58
#-----------
time=1794056
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=59
#-----------
time=1814932
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=60
#-----------
time=1835804
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=452
heap_tree=empty
#-----------
snapshot=61
#-----------
time=1856680
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=464
heap_tree=empty
#-----------
snapshot=62
#-----------
time=1877564
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=460
heap_tree=empty
desc: --massif-out-file=state_machine_semi.txt --time-unit=B --stacks=yes
cmd: ./untitled6
time_unit: B
#-----------
snapshot=0
#-----------
time=0
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=0
heap_tree=empty
#-----------
snapshot=1
#-----------
time=27168
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=7016
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=2
#-----------
time=69724
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1780
heap_tree=empty
#-----------
snapshot=3
#-----------
time=94072
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=4328
heap_tree=empty
#-----------
snapshot=4
#-----------
time=131848
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=4160
heap_tree=empty
#-----------
snapshot=5
#-----------
time=162248
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=5936
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=6
#-----------
time=185196
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=2380
heap_tree=empty
#-----------
snapshot=7
#-----------
time=213668
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=8
#-----------
time=235060
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=9
#-----------
time=265784
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=10
#-----------
time=309768
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=11
#-----------
time=330048
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=12
#-----------
time=374092
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=13
#-----------
time=411452
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=14
#-----------
time=451212
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=15
#-----------
time=476064
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=16
#-----------
time=515676
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=17
#-----------
time=560448
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=18
#-----------
time=595304
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=19
#-----------
time=620108
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1060
heap_tree=empty
#-----------
snapshot=20
#-----------
time=644888
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=21
#-----------
time=680376
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=empty
#-----------
snapshot=22
#-----------
time=721500
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=23
#-----------
time=748868
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=24
#-----------
time=783188
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=25
#-----------
time=810604
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=26
#-----------
time=837864
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=27
#-----------
time=865192
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=28
#-----------
time=906220
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=29
#-----------
time=933708
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=30
#-----------
time=961064
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=768
heap_tree=empty
#-----------
snapshot=31
#-----------
time=1002080
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1048
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=32
#-----------
time=1038028
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=33
#-----------
time=1062044
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=34
#-----------
time=1085944
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=35
#-----------
time=1109900
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=36
#-----------
time=1145820
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=37
#-----------
time=1169808
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1072
heap_tree=empty
#-----------
snapshot=38
#-----------
time=1205756
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=39
#-----------
time=1229672
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1072
heap_tree=empty
#-----------
snapshot=40
#-----------
time=1265656
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=41
#-----------
time=1301552
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=912
heap_tree=empty
#-----------
snapshot=42
#-----------
time=1337492
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=empty
#-----------
snapshot=43
#-----------
time=1361404
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=948
heap_tree=detailed
n0: 0 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
#-----------
snapshot=44
#-----------
time=1409220
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=45
#-----------
time=1433204
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=46
#-----------
time=1457172
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=804
heap_tree=empty
#-----------
snapshot=47
#-----------
time=1493044
mem_heap_B=0
mem_heap_extra_B=0
mem_stacks_B=1060
heap_tree=empty
#-----------
snapshot=48
#-----------
time=1540492
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=380
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=49
#-----------
time=1588248
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=50
#-----------
time=1608532
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=51
#-----------
time=1628816
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=52
#-----------
time=1649096
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=53
#-----------
time=1669384
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=54
#-----------
time=1689664
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=55
#-----------
time=1709944
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=56
#-----------
time=1730228
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=57
#-----------
time=1750516
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=58
#-----------
time=1770800
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=59
#-----------
time=1791080
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=60
#-----------
time=1811368
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=61
#-----------
time=1831648
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=62
#-----------
time=1851928
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=63
#-----------
time=1872212
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=64
#-----------
time=1892500
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=65
#-----------
time=1912784
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=66
#-----------
time=1933064
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=67
#-----------
time=1953352
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=68
#-----------
time=1973632
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=69
#-----------
time=1993912
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=70
#-----------
time=2014196
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=71
#-----------
time=2034484
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=72
#-----------
time=2054768
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=73
#-----------
time=2075048
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=74
#-----------
time=2095336
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=75
#-----------
time=2115616
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=76
#-----------
time=2135896
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=77
#-----------
time=2156180
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=78
#-----------
time=2176468
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=79
#-----------
time=2196752
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=80
#-----------
time=2217032
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=81
#-----------
time=2237320
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=82
#-----------
time=2257600
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=83
#-----------
time=2277880
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=84
#-----------
time=2298164
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=85
#-----------
time=2318452
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=86
#-----------
time=2338736
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=87
#-----------
time=2359016
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=88
#-----------
time=2379304
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=89
#-----------
time=2399584
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=90
#-----------
time=2419864
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=368
heap_tree=empty
#-----------
snapshot=91
#-----------
time=2440148
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=92
#-----------
time=2460436
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=372
heap_tree=empty
#-----------
snapshot=93
#-----------
time=2480720
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=360
heap_tree=empty
#-----------
snapshot=94
#-----------
time=2501000
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=384
heap_tree=empty
#-----------
snapshot=95
#-----------
time=2502176
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=600
heap_tree=detailed
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
#-----------
snapshot=96
#-----------
time=2502684
mem_heap_B=20224
mem_heap_extra_B=8
mem_stacks_B=884
heap_tree=peak
n1: 20224 (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
n0: 20224 0x48F27FA: ??? (in /usr/lib/arm-linux-gnueabihf/libstdc++.so.6.0.25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment