Commit 34d6a8e9 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

accept %p formats with or without a leading 0x

parent fcba8f29
......@@ -21,8 +21,8 @@
$mem_stats = '';
while (<>) {
$gets{$1.$2} = $_ if (/mem_get\(([0-9a-f]+), [0-9a-f]+\) -> ([0-9a-f]+)/);
delete $gets{$1.$2} if /mem_put\(([0-9a-f]+), ([0-9a-f]+), [0-9a-f]+\)/;
$gets{$1.$2} = $_ if (/mem_get\((?:0x)?([0-9a-f]+), (?:0x)?[0-9a-f]+\) -> (?:0x)?([0-9a-f]+)/);
delete $gets{$1.$2} if /mem_put\((?:0x)?([0-9a-f]+), (?:0x)?([0-9a-f]+), (?:0x)?[0-9a-f]+\)/;
$mem_stats .= $_ if /\d+ gets, +(\d+) rem/ && $1 > 0;
}
print join('', values %gets);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment