-
Notifications
You must be signed in to change notification settings - Fork 59
scripts: disable tcmalloc to support valgrind memcheck #170
Conversation
scripts/linux/build.sh
Outdated
@@ -79,6 +79,14 @@ else | |||
echo "NO_TEST=NO" | |||
fi | |||
|
|||
# valgrind can not work together with gpertools | |||
if [ "$WITH_VALGRIND" == "YES" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不直接把命令叫做ENABLE_GPERF,偏要叫做WITH_VALGRIND?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原本是准备叫 --disable_gperf,但是我感觉作为 shell 工具,叫 --with_valgrind 更易用更直观,当然你觉得名字一致比较重要就可以改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得名字一致比较重要:用了某个命令,到底干了什么事情,这样比较直观的。另一个原因是,我想禁用gperf的原因,不一定是要开valgrind, 也可能就是想单纯的对比下性能。
你可以在--disable_gperf的help里面,或者一些文档里面说明"you may want to use this option when you want to run valgrind"之类的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外我看你把format子命令删了。这样的话,也可以顺手把scripts/linux/format.sh也一起删了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已删
run.sh
Outdated
@@ -61,6 +51,7 @@ function usage_build() | |||
echo " --enable_gcov generate gcov code coverage report, default no" | |||
echo " -v|--verbose build in verbose mode, default no" | |||
echo " --notest build without building unit tests, default no" | |||
echo " --disable_gperf build without gperftools, default no" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build without gperftools (to bring in tcmalloc)
Now we are able to use:
to disable tcmalloc, and we can then perform valgrind memcheck in builder/bin/<test_name>, like