mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 13:05:38 +01:00
468a76f88a
To find any files with a missing copyright declaration, use the following script: # ======================== #!/bin/sh # Find files with copyright declarations, and list their file extensions exts=$(grep -Ril --exclude-dir .git 'Copyright.*Arm' | sed ' s/.*\./-name "*./ s/$/"/ ' | sort -u | sed -n ' :l N $!bl s/\n/ -o /gp ') # Find files with file extensions that ususally include copyright extensions, but don't include a copyright declaration themselves. eval "find -path './.git' -prune -o ! -path './tests/data_files/format_pkcs12.fmt' '(' $exts ')' -print" | xargs grep -Li 'Copyright.*Arm' # ======================== Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
38 lines
865 B
Perl
Executable File
38 lines
865 B
Perl
Executable File
#!/usr/bin/env perl
|
|
|
|
# Parse a massif.out.xxx file and output peak total memory usage
|
|
#
|
|
# Copyright (C) 2014, Arm Limited, All Rights Reserved
|
|
#
|
|
# This file is part of Mbed TLS (https://tls.mbed.org)
|
|
|
|
use warnings;
|
|
use strict;
|
|
|
|
use utf8;
|
|
use open qw(:std utf8);
|
|
|
|
die unless @ARGV == 1;
|
|
|
|
my @snaps;
|
|
open my $fh, '<', $ARGV[0] or die;
|
|
{ local $/ = 'snapshot='; @snaps = <$fh>; }
|
|
close $fh or die;
|
|
|
|
my ($max, $max_heap, $max_he, $max_stack) = (0, 0, 0, 0);
|
|
for (@snaps)
|
|
{
|
|
my ($heap, $heap_extra, $stack) = m{
|
|
mem_heap_B=(\d+)\n
|
|
mem_heap_extra_B=(\d+)\n
|
|
mem_stacks_B=(\d+)
|
|
}xm;
|
|
next unless defined $heap;
|
|
my $total = $heap + $heap_extra + $stack;
|
|
if( $total > $max ) {
|
|
($max, $max_heap, $max_he, $max_stack) = ($total, $heap, $heap_extra, $stack);
|
|
}
|
|
}
|
|
|
|
printf "$max (heap $max_heap+$max_he, stack $max_stack)\n";
|