1
1
#! /bin/bash
2
2
3
- # Copyright 2015 Samsung Electronics Co., Ltd.
3
+ # Copyright 2015-2016 Samsung Electronics Co., Ltd.
4
4
#
5
5
# Licensed under the Apache License, Version 2.0 (the "License");
6
6
# you may not use this file except in compliance with the License.
@@ -19,12 +19,12 @@ if [ "$1" == "-d" ]
19
19
then
20
20
TABLE=" no"
21
21
PRINT_TEST_NAME_AWK_SCRIPT=' {printf "%s;", $1}'
22
- PRINT_TOTAL_AWK_SCRIPT=' {printf "%d;%d;%d;%d \n", $1, $2, $4, $5 * 1024}'
22
+ PRINT_TOTAL_AWK_SCRIPT=' {printf "%d;%d;%d\n", $1, $2, $3 * 1024}'
23
23
24
24
shift
25
25
else
26
26
PRINT_TEST_NAME_AWK_SCRIPT=' {printf "%30s", $1}'
27
- PRINT_TOTAL_AWK_SCRIPT=' {printf "%25d%35d%35d%20d \n", $1, $2, $4, $5 * 1024}'
27
+ PRINT_TOTAL_AWK_SCRIPT=' {printf "%25d%25d%25d \n", $1, $2, $3 * 1024}'
28
28
TABLE=" yes"
29
29
fi
30
30
@@ -42,7 +42,7 @@ function is_mem_stats_build
42
42
[ -x " $1 " ] || fail_msg " Engine '$1 ' is not executable"
43
43
44
44
tmpfile=` mktemp`
45
- " $1 " --mem-stats $tmpfile | grep -- " Ignoring memory statistics option because of '!MEM_STATS' build configuration." 2>&1 > /dev/null
45
+ " $1 " --mem-stats $tmpfile 2>&1 | grep -- " Ignoring memory statistics option because of '!MEM_STATS' build configuration." 2>&1 > /dev/null
46
46
code=$?
47
47
rm $tmpfile
48
48
69
69
# Running
70
70
if [ " $TABLE " == " yes" ]
71
71
then
72
- awk ' BEGIN {printf "%30s%25s%35s%35s%20s \n", "Test name", "Heap (byte-code)", " Heap (byte-code + parser)", "Heap (byte-code + execution)", "Maximum RSS"}'
72
+ awk ' BEGIN {printf "%30s%25s%25s%25s \n", "Test name", "Peak Heap (parser)", "Peak Heap (execution)", "Maximum RSS"}'
73
73
echo
74
74
fi
75
75
78
78
test=` basename -s ' .js' $bench `
79
79
80
80
echo " $test " | awk " $PRINT_TEST_NAME_AWK_SCRIPT "
81
- MEM_STATS=$( " $JERRY_MEM_STATS " --mem-stats --mem-stats-separate $bench | grep -e " Peak allocated= " -e " Allocated =" | grep -o " [0-9]*" )
82
- RSS=$( ./tools/rss-measure.sh " $JERRY " $bench | tail -n 1 | grep -e " Rss " | grep - o " [0-9]*" )
81
+ MEM_STATS=$( " $JERRY_MEM_STATS " --mem-stats --mem-stats-separate $bench | grep -e " Peak allocated =" | grep -o " [0-9]*" )
82
+ RSS=$( ./tools/rss-measure.sh " $JERRY " $bench | tail -n 1 | grep -o " [0-9]*" )
83
83
echo $MEM_STATS $RSS | xargs | awk " $PRINT_TOTAL_AWK_SCRIPT "
84
84
done
0 commit comments