New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 892355 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 891026



Sign in to add a comment

Pathologically slow Mac ASAN compile of src/third_party/angle/src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp

Project Member Reported by kbr@chromium.org, Oct 4

Issue description

In Issue 891026 I reported a pathologically slow compile of src/third_party/angle/src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp on macOS with ASAN turned on and symbol_level=1. Removing symbol_level=1 allows the compile to proceed.

Attached is the preprocessed file, generated with this command line (extracted from Goma and modified):

../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/libANGLE/DispatchTableGL_autogen.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DMEMORY_TOOL_REPLACES_ALLOCATOR -DMEMORY_SANITIZER_INITIAL_SIZE -DADDRESS_SANITIZER -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -DCR_XCODE_VERSION=0832 -DCR_CLANG_REVISION="343342-1" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -DANGLE_IS_64_BIT_CPU -DANGLE_ENABLE_OPENGL -DANGLE_ENABLE_OPENGL_NULL -DANGLE_ENABLE_NULL -DLIBANGLE_IMPLEMENTATION -DANGLE_ENABLE_RELEASE_ASSERTS -I../../third_party/angle/src/third_party/khronos -Igen/angle -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/common/third_party/base -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/include -fno-strict-aliasing -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -arch x86_64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -Wno-defaulted-function-deleted -O2 -fno-omit-frame-pointer -g1 -isysroot ../../build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9.0 -gcolumn-info -fsanitize=address -fno-sanitize-address-use-after-scope -mllvm -asan-globals=0 -fsanitize-blacklist=../../tools/memory/asan/blacklist.txt -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Winconsistent-missing-override -Wunneeded-internal-declaration -Wnon-virtual-dtor -std=c++14 -stdlib=libc++ -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -E ../../third_party/angle/src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp > DispatchTableGL_autogen_preprocessed.cpp

I've confirmed locally that attempting to compile this file with the following command line reproduces the pathologically slow build.

../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/libANGLE/DispatchTableGL_autogen.o.d -fno-strict-aliasing -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -arch x86_64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -Wno-defaulted-function-deleted -O2 -fno-omit-frame-pointer -g1 -isysroot ../../build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9.0 -gcolumn-info -fsanitize=address -fno-sanitize-address-use-after-scope -mllvm -asan-globals=0 -fsanitize-blacklist=../../tools/memory/asan/blacklist.txt -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Winconsistent-missing-override -Wunneeded-internal-declaration -Wnon-virtual-dtor -std=c++14 -stdlib=libc++ -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c DispatchTableGL_autogen_preprocessed.cpp -o DispatchTableGL_autogen_preprocessed.o

 
DispatchTableGL_autogen_preprocessed.cpp
3.6 MB View Download
Thanks for the reproducer!

Here's the cc1 invocation:

clang -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelocation-model pic -pic-level 2 -mthread-model posix -fmerge-all-constants -mdisable-fp-elim -relaxed-aliasing -munwind-tables -faligned-alloc-unavailable -target-cpu core2 -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=2 -debugger-tuning=lldb -ggnu-pubnames -stdlib=libc++ -O2 -std=c++14 -fvisibility hidden -fvisibility-inlines-hidden -fsanitize=address -fsanitize-address-globals-dead-stripping -fno-assume-sane-operator-new -stack-protector 1 -fblocks -fencode-extended-block-signature -fno-rtti -fregister-global-dtors-with-atexit -fobjc-runtime=macosx-10.9.0 -fmax-type-align=16 -mllvm -instcombine-lower-dbg-declare=0 -mllvm -asan-globals=0 -o /dev/null -x c++  DispatchTableGL_autogen_preprocessed.cpp
Labels: clang
Cc: kcc@chromium.org euge...@chromium.org
FWIW adding -mllvm -regalloc=pbqp -mllvm -pbqp-coalescing fixes the problem (i.e. the bottleneck is again in the regallocator)
Labels: M-73 Target-73
Owner: thakis@chromium.org
Status: Assigned (was: Untriaged)
Mac triage: assigning to thakis@ for followup :)

Sign in to add a comment