diff options
author | 2017-04-25 03:31:15 -0700 | |
---|---|---|
committer | 2017-05-22 06:48:08 +0000 | |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/ipxe/src/util/diffsize.pl | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/ipxe/src/util/diffsize.pl')
-rwxr-xr-x | qemu/roms/ipxe/src/util/diffsize.pl | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/qemu/roms/ipxe/src/util/diffsize.pl b/qemu/roms/ipxe/src/util/diffsize.pl deleted file mode 100755 index ced07862d..000000000 --- a/qemu/roms/ipxe/src/util/diffsize.pl +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/perl -w -# usage: -# [somebody@somewhere ~/ipxe/src]$ ./util/diffsize.pl [<old rev> [<new rev>]] -# by default <old rev> is HEAD and <new rev> is the working tree - -use strict; - --d "bin" or die "Please run me in the iPXE src directory\n"; -mkdir ".sizes"; - -my($oldrev, $newrev); -my($oldname, $newname); - -if (@ARGV) { - $oldname = shift; -} else { - $oldname = "HEAD"; -} - -if (@ARGV) { - $newname = shift; -} else { - $newrev = "tree" . time(); -} - -$oldrev = `git rev-parse $oldname`; -chomp $oldrev; - -unless (defined $newrev) { - $newrev = `git rev-parse $newname`; - chomp $newrev; -} - -sub calc_sizes($$) { - my($name, $rev) = @_; - my $output; - my $lastrev; - my $stashed = 0; - my $res = 0; - - return if -e ".sizes/$rev.sizes"; - - if (defined $name) { - $output = `git stash`; - $stashed = 1 unless $output =~ /No local changes to save/; - $lastrev = `git name-rev --name-only HEAD`; - system("git checkout $name >/dev/null"); $res ||= $?; - } - - system("make -j4 bin/ipxe.lkrn >/dev/null"); $res ||= $?; - system("make bin/ipxe.lkrn.sizes > .sizes/$rev.sizes"); $res ||= $?; - - if (defined $name) { - system("git checkout $lastrev >/dev/null"); $res ||= $?; - system("git stash pop >/dev/null") if $stashed; $res ||= $?; - } - - if ($res) { - unlink(".sizes/$rev.sizes"); - die "Error making sizes file\n"; - } -} - -our %Sizes; - -sub save_sizes($$) { - my($id, $rev) = @_; - my $file = ".sizes/$rev.sizes"; - - open SIZES, $file or die "opening $file: $!\n"; - while (<SIZES>) { - my($text, $data, $bss, $total, $hex, $name) = split; - $name =~ s|bin/||; $name =~ s|\.o$||; - - # Skip the header and totals lines - next if $total =~ /[a-z]/ or $name =~ /TOTALS/; - - # Skip files named with dash, due to old Makefile bug - next if $name =~ /-/; - - $Sizes{$name} = {old => 0, new => 0} unless exists $Sizes{$name}; - $Sizes{$name}{$id} = $total; - } -} - -calc_sizes($oldname, $oldrev); -calc_sizes($newname, $newrev); - -save_sizes('old', $oldrev); -save_sizes('new', $newrev); - -my $total = 0; - -for (sort keys %Sizes) { - my $diff = $Sizes{$_}{new} - $Sizes{$_}{old}; - if (abs($diff) >= 16) { - printf "%12s %+d\n", substr($_, 0, 12), $Sizes{$_}{new} - $Sizes{$_}{old}; - } - $total += $diff; -} -printf " TOTAL: %+d\n", $total; |