added a script for generating the memory hog traces

This commit is contained in:
Matthias Jung
2017-06-20 00:34:42 +02:00
parent e28d2a6506
commit 6ebf9b5ac7

View File

@@ -0,0 +1,21 @@
#!/usr/bin/perl -w
use warnings;
use strict;
open(LINEAR, "> ../traces/linear.stl");
open(RANDOM, "> ../traces/random.stl");
my $length = shift || die ("please give length of traces");
my $size = 0x40;
for(my $i=0; $i < $length; $i++)
{
my $r = int(rand($length));
#print $r." ".($size*$r)."\n";
print LINEAR "$i: read ".sprintf("0x%x",($size*$i))."\n";
print RANDOM "$i: read ".sprintf("0x%x",($size*$r))."\n";
}
close(LINEAR);
close(RANDOM);