Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/build_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export BAZEL_BUILD_OPTIONS="--strategy=Genrule=standalone --spawn_strategy=stand
--verbose_failures ${BAZEL_OPTIONS} --action_env=HOME --action_env=PYTHONUSERBASE \
--jobs=${NUM_CPUS} --show_task_finish"
export BAZEL_TEST_OPTIONS="${BAZEL_BUILD_OPTIONS} --test_env=HOME --test_env=PYTHONUSERBASE \
--cache_test_results=no --test_output=all"
--test_env=HEAPCHECK --test_output=all"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you were off-by-one in arg position in the cut+paste here..

[[ "${BAZEL_EXPUNGE}" == "1" ]] && "${BAZEL}" clean --expunge
ln -sf /thirdparty "${ENVOY_SRCDIR}"/ci/prebuilt
ln -sf /thirdparty_build "${ENVOY_SRCDIR}"/ci/prebuilt
Expand Down
3 changes: 3 additions & 0 deletions tools/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --define tcmalloc=disabled
build:clang-msan --copt -fsanitize-memory-track-origins=2

# Test options
test --test_env=HEAPCHECK --test_env=PPROF_PATH

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be --test_env=HEAPCHECK=normal? Is there a way to get the pprof location from the gperftools build in the local situation? Or if it's too complicated, what happens when you specify HEAPCHECK=normal but no PPROF_PATH?

@mrice32 mrice32 Jul 24, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think setting HEAPCHECK to normal in the bazel.rc is preferable. I'll do some testing. I think PPROF_PATH defaults to pprof (so it should find it if you have it installed). I'm not sure what happens if pprof doesn't exist. HEAPCHECK should work okay without using pprof anyway. It apparently just makes the heap check better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing breaks if pprof isn't installed, and the heap checker still runs. Setting --test_env=HEAPCHECK=normal --test_env=PPROF_PATH should be fine in the bazel.rc. Note: If HEAPCHECK is explicitly set to normal in bazel.rc the user cannot override it by just exporting HEAPCHECK in their local environment. The user will have to explicitly set --test_env=HEAPCHECK (grabbing the env variable) or --test_env=HEAPCHECK=[user_setting] (modifying it in the command directly) to override the normal setting. Whatever we choose, I'll add it into the docs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on which one is chosen as long as we doc it. Will let both of you choose.