File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ proc start_server {options {code undefined}} {
213213
214214 if {$::valgrind } {
215215 set pid [exec valgrind --track-origins=yes --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/redis-server $config_file > $stdout 2> $stderr &]
216+ } elseif ($::stack_logging ) {
217+ set pid [exec /usr/bin/env MallocStackLogging=1 MallocLogFile=/tmp/malloc_log.txt src/redis-server $config_file > $stdout 2> $stderr &]
216218 } else {
217219 set pid [exec src/redis-server $config_file > $stdout 2> $stderr &]
218220 }
Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ proc send_data_packet {fd status data} {
391391proc print_help_screen {} {
392392 puts [join {
393393 " --valgrind Run the test over valgrind."
394+ " --stack-logging Enable OSX leaks/malloc stack logging."
394395 " --accurate Run slow randomized tests for more iterations."
395396 " --quiet Don't show individual tests."
396397 " --single <unit> Just execute the specified unit (see next option)."
@@ -417,6 +418,10 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
417418 incr j
418419 } elseif {$opt eq {--valgrind}} {
419420 set ::valgrind 1
421+ } elseif {$opt eq {--stack-logging}} {
422+ if {[string match {*Darwin*} [exec uname -a]]} {
423+ set ::stack_logging 1
424+ }
420425 } elseif {$opt eq {--quiet}} {
421426 set ::quiet 1
422427 } elseif {$opt eq {--host}} {
You can’t perform that action at this time.
0 commit comments