Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
c6dbc8eb
Commit
c6dbc8eb
authored
Dec 01, 2014
by
Manuel Pégourié-Gonnard
Browse files
Output stack+heap usage with massif
parent
0de7f947
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
scripts/massif_max.pl
scripts/massif_max.pl
+5
-3
No files found.
scripts/massif_max.pl
View file @
c6dbc8eb
...
...
@@ -15,7 +15,7 @@ open my $fh, '<', $ARGV[0] or die;
{
local
$/
=
'
snapshot=
';
@snaps
=
<
$fh
>
;
}
close
$fh
or
die
;
my
$max
=
0
;
my
(
$max
,
$max_heap
,
$max_he
,
$max_stack
)
=
(
0
,
0
,
0
,
0
)
;
for
(
@snaps
)
{
my
(
$heap
,
$heap_extra
,
$stack
)
=
m{
...
...
@@ -25,7 +25,9 @@ for (@snaps)
}xm
;
next
unless
defined
$heap
;
my
$total
=
$heap
+
$heap_extra
+
$stack
;
$max
=
$total
if
$total
>
$max
;
if
(
$total
>
$max
)
{
(
$max
,
$max_heap
,
$max_he
,
$max_stack
)
=
(
$total
,
$heap
,
$heap_extra
,
$stack
);
}
}
printf
"
$max
\n
";
printf
"
$max
(heap
$max_heap
+
$max_he
, stack
$max_stack
)
\n
";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment