Today’s episode is all about Valgrind – from the pro’s to the con’s, from the why to the how! This episode will be of interest to anyone who is or wants to work with Valgrind on a regular or semi-regular basis.
- Pro’s/Why
- Con’s
- How
- Using the latest version
sudo [yum/apt-get] install valgrind
#OR#
sudo [yum/apt-get] remove valgrind
sudo [yum/apt-get] install bzip2 glibc*
wget http://valgrind.org/downloads/valgrind-3.10.1.tar.bz2
tar -xf valgrind-3.10.1.tar.bz2; cd valgrind-3.10.1
./configure; make; sudo make install
valgrind –version # This should now read 3.10.1 - VGDB (cd ./mysql-test)
./lib/v1/mysql-test-run.pl –start-and-exit –valgrind –valgrind-option=”–leak-check=yes”
–valgrind-option=”–vgdb=yes” –valgrind-option=”–vgdb-error=0″ 1st
#OR# valgrind –leak-check=yes –vgdb=yes –vgdb-error=0 ./mysqld –options…
#ALSO CONSIDER# –num-callers=40 –show-reachable=yes –track-origins=yes
gdb /Percona-server/bin/mysqld
(gdb) target remote | vgdb
(gdb) bt - pquery Valgrind
- Valgrind stacks overview & analysis
- Using the latest version
Full-screen viewing @ 720p resolution recommended.
The post MySQL QA Episode 11: Valgrind Testing: Pro’s, Con’s, Why and How appeared first on Percona Data Performance Blog.