diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-01-09 18:58:58 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-01-09 18:58:58 +0000 |
commit | f9db1ac0ae02386931976828088192b4b5d04ba0 (patch) | |
tree | e20e60480abc0b5c84e81c6b825f79018d6eaab9 | |
parent | 70b246f3385478f9019fadec8fc2e030efc37b9d (diff) |
Multiple revisions 350127-350128
........
r350127 | rmudgett | 2012-01-09 12:40:33 -0600 (Mon, 09 Jan 2012) | 12 lines
Update contrib script live_ast to invoke Asterisk with valgrind and suppression file.
* Added valgrind_compare script to compare two valgrind log files for
differences.
(issue ASTERISK-17339)
Reported by: Tzafrir Cohen
Patches:
valgrind_compare (license #5035) script uploaded by Tzafrir Cohen
live_ast_valgrind.diff (license #5035) patch uploaded by Tzafrir Cohen
live_ast_valgrind_v2.diff (license #5185) patch uploaded by Paul Belanger
........
r350128 | rmudgett | 2012-01-09 12:54:56 -0600 (Mon, 09 Jan 2012) | 11 lines
live_ast: valgrind: run asterisk under valgrind
Adds a new sub-command, "valgrind" to live_ast. It runs asterisk under
valgrind. The extra command-line parameters are passed to Asterisk as
usual, and parameters to valgrind are passed through LIVE_AST_VALGRIND_ARGS
in live.conf .
Review: https://reviewboard.asterisk.org/r/1109/
Merged revisions 326636 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 350127-350128 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 350129 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | contrib/scripts/valgrind_compare | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/scripts/valgrind_compare b/contrib/scripts/valgrind_compare new file mode 100755 index 000000000..9f814d454 --- /dev/null +++ b/contrib/scripts/valgrind_compare @@ -0,0 +1,21 @@ +#!/bin/bash + +# compare_valgrind: diff two valgrinf memory usage logs. Masks out PIDs, +# addresses and such that should normally be different. +# +# Usage: ./compare_valgrind file1.log file2.log | less +# +# (Requires /bin/bash due to usage of '<()' ) + +log1="$1" +log2="$2" + +pipe_log() { + sed \ + -e 's/^--[0-9]\+-- //' -e 's/^==[0-9]\+== //' "$1" \ + -e 's/ record [0-9]\+ of [0-9]\+$/ <snipped>/' \ + -e 's/^ Address 0x[0-9a-f]\+/ Address 0x<snipped>/' \ + +} + +diff -u -L "$log1" <(pipe_log "$log1") -L "$log2" <(pipe_log "$log2") |