+@@ -1142,6 +1145,7 @@
+ 'valgrind-option=s' => \@valgrind_args,
+ 'valgrind-path=s' => \$opt_valgrind_path,
+ 'callgrind' => \$opt_callgrind,
++ 'helgrind' => \$opt_helgrind,
+ 'debug-sync-timeout=i' => \$opt_debug_sync_timeout,
+
+ # Directories
+@@ -1703,11 +1707,18 @@
+ unless @valgrind_args;
+ }
+
++ if ( $opt_helgrind )
++ {
++ mtr_report("Turning on valgrind with helgrind for mysqld(s)");
++ $opt_valgrind= 1;
++ $opt_valgrind_mysqld= 1;
++ }
++
+ if ( $opt_valgrind )
+ {
+ # Set valgrind_options to default unless already defined
+ push(@valgrind_args, @default_valgrind_args)
+- unless @valgrind_args;
++ unless @valgrind_args || $opt_helgrind;
+
+ # Don't add --quiet; you will loose the summary reports.
+
+@@ -5796,6 +5807,10 @@
+ mtr_add_arg($args, "--tool=callgrind");
+ mtr_add_arg($args, "--base=$opt_vardir/log");
+ }
++ elsif ( $opt_helgrind )
++ {
++ mtr_add_arg($args, "--tool=helgrind");
++ }
+ else
+ {
+ mtr_add_arg($args, "--tool=memcheck"); # From >= 2.1.2 needs this option