Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1585d76e
Commit
1585d76e
authored
Jul 26, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for valgrind with callgrind
parent
98e8c0bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+28
-6
No files found.
mysql-test/mysql-test-run.pl
View file @
1585d76e
...
...
@@ -290,6 +290,7 @@ our $opt_valgrind_mysqltest= 0;
our
$default_valgrind_options
=
"
--show-reachable=yes
";
our
$opt_valgrind_options
;
our
$opt_valgrind_path
;
our
$opt_callgrind
;
our
$opt_stress
=
"";
our
$opt_stress_suite
=
"
main
";
...
...
@@ -635,6 +636,7 @@ sub command_line_setup () {
'
valgrind-mysqld
'
=>
\
$opt_valgrind_mysqld
,
'
valgrind-options=s
'
=>
\
$opt_valgrind_options
,
'
valgrind-path=s
'
=>
\
$opt_valgrind_path
,
'
callgrind
'
=>
\
$opt_callgrind
,
# Stress testing
'
stress
'
=>
\
$opt_stress
,
...
...
@@ -873,6 +875,17 @@ sub command_line_setup () {
$opt_valgrind
=
1
;
}
if
(
$opt_callgrind
)
{
mtr_report
("
Turning on valgrind with callgrind for mysqld(s)
");
$opt_valgrind
=
1
;
$opt_valgrind_mysqld
=
1
;
# Set special valgrind options unless options passed on command line
$opt_valgrind_options
=
"
--trace-children=yes
"
unless
defined
$opt_valgrind_options
;
}
if
(
$opt_valgrind
)
{
# Set valgrind_options to default unless already defined
...
...
@@ -4098,12 +4111,20 @@ sub valgrind_arguments {
my
$args
=
shift
;
my
$exe
=
shift
;
if
(
$opt_callgrind
)
{
mtr_add_arg
(
$args
,
"
--tool=callgrind
");
mtr_add_arg
(
$args
,
"
--base=
$opt_vardir
/log
");
}
else
{
mtr_add_arg
(
$args
,
"
--tool=memcheck
");
# From >= 2.1.2 needs this option
mtr_add_arg
(
$args
,
"
--alignment=8
");
mtr_add_arg
(
$args
,
"
--leak-check=yes
");
mtr_add_arg
(
$args
,
"
--num-callers=16
");
mtr_add_arg
(
$args
,
"
--suppressions=%s/valgrind.supp
",
$glob_mysql_test_dir
)
if
-
f
"
$glob_mysql_test_dir
/valgrind.supp
";
}
# Add valgrind options, can be overriden by user
mtr_add_arg
(
$args
,
'
%s
',
$_
)
for
(
split
('
',
$opt_valgrind_options
));
...
...
@@ -4226,6 +4247,7 @@ Options for coverage, profiling etc
valgrind-mysqld Run the "mysqld" executable with valgrind
valgrind-options=ARGS Options to give valgrind, replaces default options
valgrind-path=[EXE] Path to the valgrind executable
callgrind Instruct valgrind to use callgrind
Misc options
...
...
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