Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[self-profiler] add selfprofiling to llvm #68406

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

andjo403
Copy link
Contributor

@andjo403 andjo403 commented Jan 20, 2020

using pass name as event id and add additional data with name of module, function …

image

r? @michaelwoerister or @wesleywiser

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2020
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-20T22:40:59.6692169Z ========================== Starting Command Output ===========================
2020-01-20T22:40:59.6693998Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/945868a9-d5be-43f2-b714-0dcc3a51f4fa.sh
2020-01-20T22:40:59.6694039Z 
2020-01-20T22:40:59.6696958Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-20T22:40:59.6702846Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-20T22:40:59.6704582Z Task         : Get sources
2020-01-20T22:40:59.6704618Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-20T22:40:59.6704660Z Version      : 1.0.0
2020-01-20T22:40:59.6704694Z Author       : Microsoft
---
2020-01-20T22:41:00.5264651Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-20T22:41:00.5365114Z ##[command]git config gc.auto 0
2020-01-20T22:41:00.5449403Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-20T22:41:00.5499496Z ##[command]git config --get-all http.proxy
2020-01-20T22:41:00.5644214Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68406/merge:refs/remotes/pull/68406/merge
---
2020-01-20T22:52:04.8063216Z configure: build.locked-deps    := True
2020-01-20T22:52:04.8063271Z configure: llvm.ccache          := sccache
2020-01-20T22:52:04.8063523Z configure: build.cargo-native-static := True
2020-01-20T22:52:04.8063792Z configure: dist.missing-tools   := True
2020-01-20T22:52:04.8064259Z configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
2020-01-20T22:52:04.8064545Z configure: writing `config.toml` in current directory
2020-01-20T22:52:04.8064583Z configure: 
2020-01-20T22:52:04.8064792Z configure: run `python /checkout/x.py --help`
2020-01-20T22:52:04.8064850Z configure: 
---
2020-01-20T22:55:39.6725305Z     Checking rustc_data_structures v0.0.0 (/checkout/src/librustc_data_structures)
2020-01-20T22:55:39.8384705Z error[E0432]: unresolved import `libc`
2020-01-20T22:55:39.8385810Z   --> src/librustc_data_structures/profiling.rs:98:5
2020-01-20T22:55:39.8386277Z    |
2020-01-20T22:55:39.8386712Z 98 | use libc::{c_char, c_void};
2020-01-20T22:55:39.8392751Z 
2020-01-20T22:55:40.7064145Z error: aborting due to previous error
2020-01-20T22:55:40.7065739Z 
2020-01-20T22:55:40.7076008Z For more information about this error, try `rustc --explain E0432`.
2020-01-20T22:55:40.7076008Z For more information about this error, try `rustc --explain E0432`.
2020-01-20T22:55:40.7136116Z error: could not compile `rustc_data_structures`.
2020-01-20T22:55:40.7156318Z warning: build failed, waiting for other jobs to finish...
2020-01-20T22:55:48.1607445Z error: build failed
2020-01-20T22:55:48.1626046Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "i686-pc-windows-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2020-01-20T22:55:48.1642165Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu
2020-01-20T22:55:48.1642298Z Build completed unsuccessfully in 0:02:09
2020-01-20T22:55:48.1694305Z == clock drift check ==
2020-01-20T22:55:48.1712239Z   local time: Mon Jan 20 22:55:48 UTC 2020
2020-01-20T22:55:48.1712239Z   local time: Mon Jan 20 22:55:48 UTC 2020
2020-01-20T22:55:48.3343313Z   network time: Mon, 20 Jan 2020 22:55:48 GMT
2020-01-20T22:55:48.3343406Z == end clock drift check ==
2020-01-20T22:55:48.8685024Z 
2020-01-20T22:55:48.8795771Z ##[error]Bash exited with code '1'.
2020-01-20T22:55:48.8807564Z ##[section]Finishing: Run build
2020-01-20T22:55:48.8822573Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-20T22:55:48.8824365Z Task         : Get sources
2020-01-20T22:55:48.8824403Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-20T22:55:48.8824454Z Version      : 1.0.0
2020-01-20T22:55:48.8824487Z Author       : Microsoft
2020-01-20T22:55:48.8824487Z Author       : Microsoft
2020-01-20T22:55:48.8824522Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-20T22:55:48.8824583Z ==============================================================================
2020-01-20T22:55:49.2962744Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-20T22:55:49.3004171Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-20T22:55:49.3117148Z Cleaning up task key
2020-01-20T22:55:49.3118264Z Start cleaning up orphan processes.
2020-01-20T22:55:49.3224053Z Terminate orphan process: pid (3828) (python)
2020-01-20T22:55:49.3430099Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-21T06:38:37.1923205Z ========================== Starting Command Output ===========================
2020-01-21T06:38:37.1925491Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/62254e3e-c034-4cdf-845f-18ee933ed685.sh
2020-01-21T06:38:37.1925688Z 
2020-01-21T06:38:37.1930006Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-21T06:38:37.1937177Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T06:38:37.1939321Z Task         : Get sources
2020-01-21T06:38:37.1939356Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-21T06:38:37.1939400Z Version      : 1.0.0
2020-01-21T06:38:37.1939435Z Author       : Microsoft
---
2020-01-21T06:38:38.0271251Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-21T06:38:38.0367478Z ##[command]git config gc.auto 0
2020-01-21T06:38:38.0452946Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-21T06:38:38.0509888Z ##[command]git config --get-all http.proxy
2020-01-21T06:38:38.0645438Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68406/merge:refs/remotes/pull/68406/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@michaelwoerister
Copy link
Member

Thanks for the PR, @andjo403! I'll try to take a closer look at this some time later this week.

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

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

I have some minor feedback about the self-profiler changes. I don't know enough about LLVM to review those parts so I'll leave that to @michaelwoerister.

src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
src/librustc_data_structures/profiling.rs Show resolved Hide resolved
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-21T19:01:17.2118367Z ========================== Starting Command Output ===========================
2020-01-21T19:01:17.2134578Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/efba20dd-0aa7-4fe3-b302-5f5bbd2b3c69.sh
2020-01-21T19:01:17.2315893Z 
2020-01-21T19:01:17.2376884Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-21T19:01:17.2383267Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:01:17.2384974Z Task         : Get sources
2020-01-21T19:01:17.2385051Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-21T19:01:17.2385087Z Version      : 1.0.0
2020-01-21T19:01:17.2385122Z Author       : Microsoft
---
2020-01-21T19:01:18.0916030Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-21T19:01:18.1001746Z ##[command]git config gc.auto 0
2020-01-21T19:01:18.1076346Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-21T19:01:18.1133259Z ##[command]git config --get-all http.proxy
2020-01-21T19:01:18.1264191Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68406/merge:refs/remotes/pull/68406/merge
---
2020-01-21T19:08:19.8751858Z    Compiling jobserver v0.1.16
2020-01-21T19:08:21.0428035Z error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)`
2020-01-21T19:08:21.0441039Z 
2020-01-21T19:08:21.0441295Z Caused by:
2020-01-21T19:08:21.0490935Z   process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build/rustc_llvm-180f5513e9eeadc0/build-script-build` (exit code: 1)
2020-01-21T19:08:21.0492868Z --- stdout
2020-01-21T19:08:21.0493132Z cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
2020-01-21T19:08:21.0494415Z cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
2020-01-21T19:08:21.0494696Z cargo:rerun-if-changed=/usr/lib/llvm-7/bin/llvm-config
2020-01-21T19:08:21.0494979Z cargo:rerun-if-env-changed=LLVM_CONFIG
2020-01-21T19:08:21.0495219Z cargo:rustc-cfg=llvm_component="aarch64"
2020-01-21T19:08:21.0495452Z cargo:rustc-cfg=llvm_component="amdgpu"
2020-01-21T19:08:21.0495712Z cargo:rustc-cfg=llvm_component="arm"
2020-01-21T19:08:21.0496070Z cargo:rustc-cfg=llvm_component="asmparser"
2020-01-21T19:08:21.0496307Z cargo:rustc-cfg=llvm_component="bitreader"
2020-01-21T19:08:21.0496549Z cargo:rustc-cfg=llvm_component="bitwriter"
2020-01-21T19:08:21.0496879Z cargo:rustc-cfg=llvm_component="hexagon"
2020-01-21T19:08:21.0497131Z cargo:rustc-cfg=llvm_component="instrumentation"
2020-01-21T19:08:21.0497362Z cargo:rustc-cfg=llvm_component="ipo"
2020-01-21T19:08:21.0497711Z cargo:rustc-cfg=llvm_component="linker"
2020-01-21T19:08:21.0497949Z cargo:rustc-cfg=llvm_component="lto"
2020-01-21T19:08:21.0500322Z cargo:rustc-cfg=llvm_component="mips"
2020-01-21T19:08:21.0500737Z cargo:rustc-cfg=llvm_component="msp430"
2020-01-21T19:08:21.0501288Z cargo:rustc-cfg=llvm_component="nvptx"
2020-01-21T19:08:21.0501540Z cargo:rustc-cfg=llvm_component="powerpc"
2020-01-21T19:08:21.0501782Z cargo:rustc-cfg=llvm_component="sparc"
2020-01-21T19:08:21.0502008Z cargo:rustc-cfg=llvm_component="systemz"
2020-01-21T19:08:21.0502234Z cargo:rustc-cfg=llvm_component="webassembly"
2020-01-21T19:08:21.0502459Z cargo:rustc-cfg=llvm_component="x86"
2020-01-21T19:08:21.0502701Z cargo:rerun-if-changed-env=LLVM_RUSTLLVM
2020-01-21T19:08:21.0502933Z cargo:rerun-if-changed=../rustllvm/rustllvm.h
2020-01-21T19:08:21.0503158Z cargo:rerun-if-changed=../rustllvm/README
2020-01-21T19:08:21.0503402Z cargo:rerun-if-changed=../rustllvm/Linker.cpp
2020-01-21T19:08:21.0503655Z cargo:rerun-if-changed=../rustllvm/ArchiveWrapper.cpp
2020-01-21T19:08:21.0503891Z cargo:rerun-if-changed=../rustllvm/.editorconfig
2020-01-21T19:08:21.0504147Z cargo:rerun-if-changed=../rustllvm/PassWrapper.cpp
2020-01-21T19:08:21.0504381Z cargo:rerun-if-changed=../rustllvm/RustWrapper.cpp
2020-01-21T19:08:21.0504608Z TARGET = Some("x86_64-unknown-linux-gnu")
2020-01-21T19:08:21.0504687Z OPT_LEVEL = Some("2")
2020-01-21T19:08:21.0504915Z HOST = Some("x86_64-unknown-linux-gnu")
2020-01-21T19:08:21.0505150Z CXX_x86_64-unknown-linux-gnu = Some("sccache c++")
2020-01-21T19:08:21.0505443Z CXXFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
2020-01-21T19:08:21.0505501Z CRATE_CC_NO_DEFAULTS = None
2020-01-21T19:08:21.0505551Z DEBUG = Some("false")
2020-01-21T19:08:21.0505616Z CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
2020-01-21T19:08:21.0507440Z running: "sccache" "sccache" "c++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/usr/lib/llvm-7/include" "-std=c++0x" "-fuse-ld=gold" "-Wl,--no-keep-files-mapped" "-Wl,--no-map-whole-files" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wno-missing-field-initializers" "-pedantic" "-Wno-long-long" "-Wno-maybe-uninitialized" "-Wdelete-non-virtual-dtor" "-Wno-comment" "-ffunction-sections" "-fdata-sections" "-O2" "-DNDEBUG" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DNDEBUG" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-30250cab0b252f3a/out/../rustllvm/PassWrapper.o" "-c" "../rustllvm/PassWrapper.cpp"
2020-01-21T19:08:21.0508014Z cargo:warning=../rustllvm/PassWrapper.cpp:630:50: error: 'Any' in namespace 'llvm' does not name a type
2020-01-21T19:08:21.0508080Z cargo:warning= std::string LLVMRustwrappedIrGetName(const llvm::Any &WrappedIr) {
2020-01-21T19:08:21.0508140Z cargo:warning=                                                  ^~~
2020-01-21T19:08:21.0508461Z cargo:warning=../rustllvm/PassWrapper.cpp: In function 'std::__cxx11::string LLVMRustwrappedIrGetName(const int&)':
2020-01-21T19:08:21.0508751Z cargo:warning=../rustllvm/PassWrapper.cpp:631:7: error: 'any_isa' was not declared in this scope
2020-01-21T19:08:21.0508812Z cargo:warning=   if (any_isa<const Module *>(WrappedIr))
2020-01-21T19:08:21.0508878Z cargo:warning=       ^~~~~~~
2020-01-21T19:08:21.0509171Z cargo:warning=../rustllvm/PassWrapper.cpp:631:15: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0509229Z cargo:warning=   if (any_isa<const Module *>(WrappedIr))
2020-01-21T19:08:21.0509297Z cargo:warning=               ^~~~~
2020-01-21T19:08:21.0509576Z cargo:warning=../rustllvm/PassWrapper.cpp:631:15: error: expected ')' before 'const'
2020-01-21T19:08:21.0509864Z cargo:warning=../rustllvm/PassWrapper.cpp:632:12: error: 'any_cast' was not declared in this scope
2020-01-21T19:08:21.0510146Z cargo:warning=     return any_cast<const Module *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0510198Z cargo:warning=            ^~~~~~~~
2020-01-21T19:08:21.0510479Z cargo:warning=../rustllvm/PassWrapper.cpp:632:21: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0510759Z cargo:warning=     return any_cast<const Module *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0510812Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0511090Z cargo:warning=../rustllvm/PassWrapper.cpp:632:21: error: expected ';' before 'const'
2020-01-21T19:08:21.0511414Z cargo:warning=../rustllvm/PassWrapper.cpp:631:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2020-01-21T19:08:21.0511472Z cargo:warning=   if (any_isa<const Module *>(WrappedIr))
2020-01-21T19:08:21.0511520Z cargo:warning=   ^~
2020-01-21T19:08:21.0511881Z cargo:warning=../rustllvm/PassWrapper.cpp:632:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2020-01-21T19:08:21.0512154Z cargo:warning=     return any_cast<const Module *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0512224Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0512507Z cargo:warning=../rustllvm/PassWrapper.cpp:632:35: error: expected unqualified-id before '>' token
2020-01-21T19:08:21.0512774Z cargo:warning=     return any_cast<const Module *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0512854Z cargo:warning=                                   ^
2020-01-21T19:08:21.0513136Z cargo:warning=../rustllvm/PassWrapper.cpp:632:35: error: expected initializer before '>' token
2020-01-21T19:08:21.0513420Z cargo:warning=../rustllvm/PassWrapper.cpp:633:7: error: 'any_isa' was not declared in this scope
2020-01-21T19:08:21.0513494Z cargo:warning=   if (any_isa<const Function *>(WrappedIr))
2020-01-21T19:08:21.0513598Z cargo:warning=       ^~~~~~~
2020-01-21T19:08:21.0513896Z cargo:warning=../rustllvm/PassWrapper.cpp:633:15: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0513971Z cargo:warning=   if (any_isa<const Function *>(WrappedIr))
2020-01-21T19:08:21.0514022Z cargo:warning=               ^~~~~
2020-01-21T19:08:21.0514290Z cargo:warning=../rustllvm/PassWrapper.cpp:633:15: error: expected ')' before 'const'
2020-01-21T19:08:21.0514590Z cargo:warning=../rustllvm/PassWrapper.cpp:634:12: error: 'any_cast' was not declared in this scope
2020-01-21T19:08:21.0514859Z cargo:warning=     return any_cast<const Function *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0514965Z cargo:warning=            ^~~~~~~~
2020-01-21T19:08:21.0515272Z cargo:warning=../rustllvm/PassWrapper.cpp:634:21: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0515541Z cargo:warning=     return any_cast<const Function *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0515604Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0515888Z cargo:warning=../rustllvm/PassWrapper.cpp:634:21: error: expected ';' before 'const'
2020-01-21T19:08:21.0516195Z cargo:warning=../rustllvm/PassWrapper.cpp:633:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2020-01-21T19:08:21.0516254Z cargo:warning=   if (any_isa<const Function *>(WrappedIr))
2020-01-21T19:08:21.0516318Z cargo:warning=   ^~
2020-01-21T19:08:21.0516650Z cargo:warning=../rustllvm/PassWrapper.cpp:634:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2020-01-21T19:08:21.0516931Z cargo:warning=     return any_cast<const Function *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0517001Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0517281Z cargo:warning=../rustllvm/PassWrapper.cpp:634:37: error: expected unqualified-id before '>' token
2020-01-21T19:08:21.0517547Z cargo:warning=     return any_cast<const Function *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0517628Z cargo:warning=                                     ^
2020-01-21T19:08:21.0517910Z cargo:warning=../rustllvm/PassWrapper.cpp:634:37: error: expected initializer before '>' token
2020-01-21T19:08:21.0518191Z cargo:warning=../rustllvm/PassWrapper.cpp:635:7: error: 'any_isa' was not declared in this scope
2020-01-21T19:08:21.0518263Z cargo:warning=   if (any_isa<const Loop *>(WrappedIr))
2020-01-21T19:08:21.0518314Z cargo:warning=       ^~~~~~~
2020-01-21T19:08:21.0518594Z cargo:warning=../rustllvm/PassWrapper.cpp:635:15: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0518674Z cargo:warning=   if (any_isa<const Loop *>(WrappedIr))
2020-01-21T19:08:21.0518725Z cargo:warning=               ^~~~~
2020-01-21T19:08:21.0518995Z cargo:warning=../rustllvm/PassWrapper.cpp:635:15: error: expected ')' before 'const'
2020-01-21T19:08:21.0519294Z cargo:warning=../rustllvm/PassWrapper.cpp:636:12: error: 'any_cast' was not declared in this scope
2020-01-21T19:08:21.0519568Z cargo:warning=     return any_cast<const Loop *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0519621Z cargo:warning=            ^~~~~~~~
2020-01-21T19:08:21.0519919Z cargo:warning=../rustllvm/PassWrapper.cpp:636:21: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0520289Z cargo:warning=     return any_cast<const Loop *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0520506Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0520790Z cargo:warning=../rustllvm/PassWrapper.cpp:636:21: error: expected ';' before 'const'
2020-01-21T19:08:21.0521097Z cargo:warning=../rustllvm/PassWrapper.cpp:635:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2020-01-21T19:08:21.0521165Z cargo:warning=   if (any_isa<const Loop *>(WrappedIr))
2020-01-21T19:08:21.0521229Z cargo:warning=   ^~
2020-01-21T19:08:21.0521562Z cargo:warning=../rustllvm/PassWrapper.cpp:636:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2020-01-21T19:08:21.0521991Z cargo:warning=     return any_cast<const Loop *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0522061Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0522494Z cargo:warning=../rustllvm/PassWrapper.cpp:636:33: error: expected unqualified-id before '>' token
2020-01-21T19:08:21.0522860Z cargo:warning=     return any_cast<const Loop *>(WrappedIr)->getName().str();
2020-01-21T19:08:21.0522926Z cargo:warning=                                 ^
2020-01-21T19:08:21.0523184Z cargo:warning=../rustllvm/PassWrapper.cpp:636:33: error: expected initializer before '>' token
2020-01-21T19:08:21.0523683Z cargo:warning=../rustllvm/PassWrapper.cpp:637:7: error: 'any_isa' was not declared in this scope
2020-01-21T19:08:21.0523757Z cargo:warning=   if (any_isa<const LazyCallGraph::SCC *>(WrappedIr))
2020-01-21T19:08:21.0523809Z cargo:warning=       ^~~~~~~
2020-01-21T19:08:21.0524090Z cargo:warning=../rustllvm/PassWrapper.cpp:637:15: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0524174Z cargo:warning=   if (any_isa<const LazyCallGraph::SCC *>(WrappedIr))
2020-01-21T19:08:21.0524225Z cargo:warning=               ^~~~~
2020-01-21T19:08:21.0524496Z cargo:warning=../rustllvm/PassWrapper.cpp:637:15: error: expected ')' before 'const'
2020-01-21T19:08:21.0524796Z cargo:warning=../rustllvm/PassWrapper.cpp:638:12: error: 'any_cast' was not declared in this scope
2020-01-21T19:08:21.0525068Z cargo:warning=     return any_cast<const LazyCallGraph::SCC *>(WrappedIr)->getName();
2020-01-21T19:08:21.0525121Z cargo:warning=            ^~~~~~~~
2020-01-21T19:08:21.0525415Z cargo:warning=../rustllvm/PassWrapper.cpp:638:21: error: expected primary-expression before 'const'
2020-01-21T19:08:21.0525698Z cargo:warning=     return any_cast<const LazyCallGraph::SCC *>(WrappedIr)->getName();
2020-01-21T19:08:21.0525753Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0526034Z cargo:warning=../rustllvm/PassWrapper.cpp:638:21: error: expected ';' before 'const'
2020-01-21T19:08:21.0526352Z cargo:warning=../rustllvm/PassWrapper.cpp:637:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2020-01-21T19:08:21.0526411Z cargo:warning=   if (any_isa<const LazyCallGraph::SCC *>(WrappedIr))
2020-01-21T19:08:21.0526475Z cargo:warning=   ^~
2020-01-21T19:08:21.0526809Z cargo:warning=../rustllvm/PassWrapper.cpp:638:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2020-01-21T19:08:21.0527083Z cargo:warning=     return any_cast<const LazyCallGraph::SCC *>(WrappedIr)->getName();
2020-01-21T19:08:21.0527152Z cargo:warning=                     ^~~~~
2020-01-21T19:08:21.0527445Z cargo:warning=../rustllvm/PassWrapper.cpp:638:47: error: expected unqualified-id before '>' token
2020-01-21T19:08:21.0527718Z cargo:warning=     return any_cast<const LazyCallGraph::SCC *>(WrappedIr)->getName();
2020-01-21T19:08:21.0527792Z cargo:warning=                                               ^
2020-01-21T19:08:21.0528084Z cargo:warning=../rustllvm/PassWrapper.cpp:638:47: error: expected initializer before '>' token
2020-01-21T19:08:21.0528142Z cargo:warning=../rustllvm/PassWrapper.cpp: At global scope:
2020-01-21T19:08:21.0528468Z cargo:warning=../rustllvm/PassWrapper.cpp:644:5: error: variable or field 'LLVMSelfProfileInitializeCallbacks' declared void
2020-01-21T19:08:21.0528530Z cargo:warning=     PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler,
2020-01-21T19:08:21.0528583Z cargo:warning=     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-01-21T19:08:21.0528901Z cargo:warning=../rustllvm/PassWrapper.cpp:644:5: error: 'PassInstrumentationCallbacks' was not declared in this scope
2020-01-21T19:08:21.0529196Z cargo:warning=../rustllvm/PassWrapper.cpp:644:35: error: 'PIC' was not declared in this scope
2020-01-21T19:08:21.0530694Z cargo:warning=     PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler,
2020-01-21T19:08:21.0530766Z cargo:warning=                                   ^~~
2020-01-21T19:08:21.0531142Z cargo:warning=../rustllvm/PassWrapper.cpp:644:40: error: expected primary-expression before 'void'
2020-01-21T19:08:21.0531205Z cargo:warning=     PassInstrumentationCallbacks& PIC, void* LlvmSelfProfiler,
2020-01-21T19:08:21.0531275Z cargo:warning=                                        ^~~~
2020-01-21T19:08:21.0531585Z cargo:warning=../rustllvm/PassWrapper.cpp:645:43: error: expected primary-expression before 'BeforePassCallback'
2020-01-21T19:08:21.0531646Z cargo:warning=     LLVMRustSelfProfileBeforePassCallback BeforePassCallback,
2020-01-21T19:08:21.0531721Z cargo:warning=                                           ^~~~~~~~~~~~~~~~~~
2020-01-21T19:08:21.0532089Z cargo:warning=../rustllvm/PassWrapper.cpp:646:42: error: expected primary-expression before 'AfterPassCallback'
2020-01-21T19:08:21.0532149Z cargo:warning=     LLVMRustSelfProfileAfterPassCallback AfterPassCallback) {
2020-01-21T19:08:21.0532224Z cargo:warning=                                          ^~~~~~~~~~~~~~~~~
2020-01-21T19:08:21.0532597Z cargo:warning=../rustllvm/PassWrapper.cpp:315:39: warning: 'llvm::PassBuilder::OptimizationLevel fromRust(LLVMRustPassBuilderOptLevel)' defined but not used [-Wunused-function]
2020-01-21T19:08:21.0532668Z cargo:warning= static PassBuilder::OptimizationLevel fromRust(LLVMRustPassBuilderOptLevel Level) {
2020-01-21T19:08:21.0532742Z cargo:warning=                                       ^~~~~~~~
2020-01-21T19:08:21.0532822Z 
2020-01-21T19:08:21.0533033Z --- stderr
2020-01-21T19:08:21.0533064Z 
2020-01-21T19:08:21.0533092Z 
2020-01-21T19:08:21.0533092Z 
2020-01-21T19:08:21.0534874Z error occurred: Command "sccache" "sccache" "c++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/usr/lib/llvm-7/include" "-std=c++0x" "-fuse-ld=gold" "-Wl,--no-keep-files-mapped" "-Wl,--no-map-whole-files" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wno-missing-field-initializers" "-pedantic" "-Wno-long-long" "-Wno-maybe-uninitialized" "-Wdelete-non-virtual-dtor" "-Wno-comment" "-ffunction-sections" "-fdata-sections" "-O2" "-DNDEBUG" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DNDEBUG" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-30250cab0b252f3a/out/../rustllvm/PassWrapper.o" "-c" "../rustllvm/PassWrapper.cpp" with args "c++" did not execute successfully (status code exit code: 1).
2020-01-21T19:08:21.0535128Z 
2020-01-21T19:08:21.0535156Z 
2020-01-21T19:08:21.0535445Z warning: build failed, waiting for other jobs to finish...
2020-01-21T19:08:21.5218526Z error: build failed
---
2020-01-21T19:08:21.5316120Z   local time: Tue Jan 21 19:08:21 UTC 2020
2020-01-21T19:08:21.8254126Z   network time: Tue, 21 Jan 2020 19:08:21 GMT
2020-01-21T19:08:21.8255057Z == end clock drift check ==
2020-01-21T19:08:23.3975703Z 
2020-01-21T19:08:23.4075458Z ##[error]Bash exited with code '1'.
2020-01-21T19:08:23.4086992Z ##[section]Finishing: Run build
2020-01-21T19:08:23.4101835Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:08:23.4103796Z Task         : Get sources
2020-01-21T19:08:23.4103847Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-21T19:08:23.4103913Z Version      : 1.0.0
2020-01-21T19:08:23.4103960Z Author       : Microsoft
2020-01-21T19:08:23.4103960Z Author       : Microsoft
2020-01-21T19:08:23.4104010Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-21T19:08:23.4104082Z ==============================================================================
2020-01-21T19:08:23.8121673Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-21T19:08:23.8165521Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:08:23.8270794Z Cleaning up task key
2020-01-21T19:08:23.8271550Z Start cleaning up orphan processes.
2020-01-21T19:08:23.8373492Z Terminate orphan process: pid (3522) (python)
2020-01-21T19:08:23.8550962Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-21T19:33:31.5437707Z ========================== Starting Command Output ===========================
2020-01-21T19:33:31.5440459Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/356722ba-da43-42d6-b6fb-563371cb6b9f.sh
2020-01-21T19:33:31.5440492Z 
2020-01-21T19:33:31.5442907Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-21T19:33:31.5449993Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:33:31.5451695Z Task         : Get sources
2020-01-21T19:33:31.5451725Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-21T19:33:31.5451768Z Version      : 1.0.0
2020-01-21T19:33:31.5451796Z Author       : Microsoft
---
2020-01-21T19:33:32.6003861Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-21T19:33:32.6017296Z ##[command]git config gc.auto 0
2020-01-21T19:33:32.6021166Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-21T19:33:32.6026048Z ##[command]git config --get-all http.proxy
2020-01-21T19:33:32.6033635Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68406/merge:refs/remotes/pull/68406/merge
---
2020-01-21T19:41:23.3912621Z    Compiling env_logger v0.7.1
2020-01-21T19:41:24.1488293Z error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)`
2020-01-21T19:41:24.1490010Z 
2020-01-21T19:41:24.1490277Z Caused by:
2020-01-21T19:41:24.1505036Z   process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build/rustc_llvm-180f5513e9eeadc0/build-script-build` (exit code: 1)
2020-01-21T19:41:24.1505504Z --- stdout
2020-01-21T19:41:24.1505751Z cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
2020-01-21T19:41:24.1506110Z cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
2020-01-21T19:41:24.1506314Z cargo:rerun-if-changed=/usr/lib/llvm-7/bin/llvm-config
2020-01-21T19:41:24.1506520Z cargo:rerun-if-env-changed=LLVM_CONFIG
2020-01-21T19:41:24.1506717Z cargo:rustc-cfg=llvm_component="aarch64"
2020-01-21T19:41:24.1506905Z cargo:rustc-cfg=llvm_component="amdgpu"
2020-01-21T19:41:24.1507106Z cargo:rustc-cfg=llvm_component="arm"
2020-01-21T19:41:24.1507290Z cargo:rustc-cfg=llvm_component="asmparser"
2020-01-21T19:41:24.1507473Z cargo:rustc-cfg=llvm_component="bitreader"
2020-01-21T19:41:24.1507674Z cargo:rustc-cfg=llvm_component="bitwriter"
2020-01-21T19:41:24.1507859Z cargo:rustc-cfg=llvm_component="hexagon"
2020-01-21T19:41:24.1508049Z cargo:rustc-cfg=llvm_component="instrumentation"
2020-01-21T19:41:24.1508260Z cargo:rustc-cfg=llvm_component="ipo"
2020-01-21T19:41:24.1508444Z cargo:rustc-cfg=llvm_component="linker"
2020-01-21T19:41:24.1508623Z cargo:rustc-cfg=llvm_component="lto"
2020-01-21T19:41:24.1508803Z cargo:rustc-cfg=llvm_component="mips"
2020-01-21T19:41:24.1509071Z cargo:rustc-cfg=llvm_component="msp430"
2020-01-21T19:41:24.1509250Z cargo:rustc-cfg=llvm_component="nvptx"
2020-01-21T19:41:24.1509432Z cargo:rustc-cfg=llvm_component="powerpc"
2020-01-21T19:41:24.1509640Z cargo:rustc-cfg=llvm_component="sparc"
2020-01-21T19:41:24.1509829Z cargo:rustc-cfg=llvm_component="systemz"
2020-01-21T19:41:24.1510015Z cargo:rustc-cfg=llvm_component="webassembly"
2020-01-21T19:41:24.1510215Z cargo:rustc-cfg=llvm_component="x86"
2020-01-21T19:41:24.1510397Z cargo:rerun-if-changed-env=LLVM_RUSTLLVM
2020-01-21T19:41:24.1510584Z cargo:rerun-if-changed=../rustllvm/rustllvm.h
2020-01-21T19:41:24.1510784Z cargo:rerun-if-changed=../rustllvm/README
2020-01-21T19:41:24.1510975Z cargo:rerun-if-changed=../rustllvm/Linker.cpp
2020-01-21T19:41:24.1511180Z cargo:rerun-if-changed=../rustllvm/ArchiveWrapper.cpp
2020-01-21T19:41:24.1511387Z cargo:rerun-if-changed=../rustllvm/.editorconfig
2020-01-21T19:41:24.1511583Z cargo:rerun-if-changed=../rustllvm/PassWrapper.cpp
2020-01-21T19:41:24.1511775Z cargo:rerun-if-changed=../rustllvm/RustWrapper.cpp
2020-01-21T19:41:24.1511966Z TARGET = Some("x86_64-unknown-linux-gnu")
2020-01-21T19:41:24.1512027Z OPT_LEVEL = Some("2")
2020-01-21T19:41:24.1512220Z HOST = Some("x86_64-unknown-linux-gnu")
2020-01-21T19:41:24.1512417Z CXX_x86_64-unknown-linux-gnu = Some("sccache c++")
2020-01-21T19:41:24.1512666Z CXXFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
2020-01-21T19:41:24.1512713Z CRATE_CC_NO_DEFAULTS = None
2020-01-21T19:41:24.1512755Z DEBUG = Some("false")
2020-01-21T19:41:24.1512811Z CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
2020-01-21T19:41:24.1514750Z running: "sccache" "sccache" "c++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/usr/lib/llvm-7/include" "-std=c++0x" "-fuse-ld=gold" "-Wl,--no-keep-files-mapped" "-Wl,--no-map-whole-files" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wno-missing-field-initializers" "-pedantic" "-Wno-long-long" "-Wno-maybe-uninitialized" "-Wdelete-non-virtual-dtor" "-Wno-comment" "-ffunction-sections" "-fdata-sections" "-O2" "-DNDEBUG" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DNDEBUG" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-30250cab0b252f3a/out/../rustllvm/PassWrapper.o" "-c" "../rustllvm/PassWrapper.cpp"
2020-01-21T19:41:24.1515492Z cargo:warning=../rustllvm/PassWrapper.cpp:708:5: error: 'LLVMRustSelfProfileBeforePassCallback' has not been declared
2020-01-21T19:41:24.1515561Z cargo:warning=     LLVMRustSelfProfileBeforePassCallback BeforePassCallback,
2020-01-21T19:41:24.1515613Z cargo:warning=     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-01-21T19:41:24.1517459Z cargo:warning=../rustllvm/PassWrapper.cpp:709:5: error: 'LLVMRustSelfProfileAfterPassCallback' has not been declared
2020-01-21T19:41:24.1517522Z cargo:warning=     LLVMRustSelfProfileAfterPassCallback AfterPassCallback) {
2020-01-21T19:41:24.1517571Z cargo:warning=     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-01-21T19:41:24.1517956Z cargo:warning=../rustllvm/PassWrapper.cpp:315:39: warning: 'llvm::PassBuilder::OptimizationLevel fromRust(LLVMRustPassBuilderOptLevel)' defined but not used [-Wunused-function]
2020-01-21T19:41:24.1518023Z cargo:warning= static PassBuilder::OptimizationLevel fromRust(LLVMRustPassBuilderOptLevel Level) {
2020-01-21T19:41:24.1518097Z cargo:warning=                                       ^~~~~~~~
2020-01-21T19:41:24.1518172Z 
2020-01-21T19:41:24.1518364Z --- stderr
2020-01-21T19:41:24.1518414Z 
2020-01-21T19:41:24.1518440Z 
2020-01-21T19:41:24.1518440Z 
2020-01-21T19:41:24.1520677Z error occurred: Command "sccache" "sccache" "c++" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/usr/lib/llvm-7/include" "-std=c++0x" "-fuse-ld=gold" "-Wl,--no-keep-files-mapped" "-Wl,--no-map-whole-files" "-fPIC" "-fvisibility-inlines-hidden" "-Werror=date-time" "-std=c++11" "-Wall" "-Wextra" "-Wno-unused-parameter" "-Wwrite-strings" "-Wcast-qual" "-Wno-missing-field-initializers" "-pedantic" "-Wno-long-long" "-Wno-maybe-uninitialized" "-Wdelete-non-virtual-dtor" "-Wno-comment" "-ffunction-sections" "-fdata-sections" "-O2" "-DNDEBUG" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DNDEBUG" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-30250cab0b252f3a/out/../rustllvm/PassWrapper.o" "-c" "../rustllvm/PassWrapper.cpp" with args "c++" did not execute successfully (status code exit code: 1).
2020-01-21T19:41:24.1520935Z 
2020-01-21T19:41:24.1520958Z 
2020-01-21T19:41:24.1521197Z warning: build failed, waiting for other jobs to finish...
2020-01-21T19:41:24.8447432Z error: build failed
---
2020-01-21T19:41:24.8552354Z   local time: Tue Jan 21 19:41:24 UTC 2020
2020-01-21T19:41:25.1479495Z   network time: Tue, 21 Jan 2020 19:41:25 GMT
2020-01-21T19:41:25.1482734Z == end clock drift check ==
2020-01-21T19:41:26.4956726Z 
2020-01-21T19:41:26.5048791Z ##[error]Bash exited with code '1'.
2020-01-21T19:41:26.5060211Z ##[section]Finishing: Run build
2020-01-21T19:41:26.5073999Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:41:26.5076616Z Task         : Get sources
2020-01-21T19:41:26.5076661Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-21T19:41:26.5076723Z Version      : 1.0.0
2020-01-21T19:41:26.5076763Z Author       : Microsoft
2020-01-21T19:41:26.5076763Z Author       : Microsoft
2020-01-21T19:41:26.5076807Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-21T19:41:26.5076885Z ==============================================================================
2020-01-21T19:41:26.9254329Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-21T19:41:26.9301168Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68406/merge to s
2020-01-21T19:41:26.9407932Z Cleaning up task key
2020-01-21T19:41:26.9408752Z Start cleaning up orphan processes.
2020-01-21T19:41:26.9517403Z Terminate orphan process: pid (3375) (python)
2020-01-21T19:41:26.9727045Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Jan 23, 2020

☔ The latest upstream changes (presumably #68474) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@michaelwoerister michaelwoerister left a comment

Choose a reason for hiding this comment

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

I did a first review pass. Looks great! I want to take a closer look before merging. For now, could you move the LLVM specific code to librustc_codegen_llvm (as mentioned below).

let ir_name = ir_name_to_string_id(profiler, string_cache, part);
components.push(StringComponent::Value(SEPARATOR_BYTE));
components.push(StringComponent::Ref(ir_name));
}
Copy link
Member

Choose a reason for hiding this comment

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

Is there ever more than one argument? If not you can use the EventIdBuilder::from_label_and_arg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for LazyCallGraph::SCC there can be up to 10 args (if more they are truncated by llvm) do not know if it is interesting to see all the functions in the SCC (and in that case make a new getName function in llvm that returns all not only 10) or if it is enough to print the first function. see around https://github.com/rust-lang/llvm-project/blob/a6f4c1bb07d58df5956d2c49be68547143f77b18/llvm/include/llvm/Analysis/LazyCallGraph.h#L447 for more info.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we'll want to add a EventIdBuilder::from_label_and_args(label: _, args: &[_]) method at some point anyway. For now encoding things directly is fine.

src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
src/librustc_data_structures/profiling.rs Outdated Show resolved Hide resolved
@andjo403
Copy link
Contributor Author

andjo403 commented Feb 1, 2020

have fixed the comments now

@michaelwoerister
Copy link
Member

Looks good to me, thanks @andjo403! Now just have to wait for #67954 to land.

@andjo403
Copy link
Contributor Author

andjo403 commented Feb 6, 2020

shall there be some check or documentation that llvm event recording only works when -Znew-llvm-pass-manager=y is also added can maybe be confusing when there is no llvm events in the logs?

@wesleywiser
Copy link
Member

That's a good idea and makes sense to me. I'm not sure we should error out in that case but a warning or similar seems appropriate to me.

@michaelwoerister
Copy link
Member

Yes, a warning makes sense to me too.

@andjo403
Copy link
Contributor Author

how do I add a warning? was not that easy to find some other code that use it.
rg warning did give to many results :)

@bjorn3
Copy link
Member

bjorn3 commented Feb 10, 2020

You could use sess.warn().

@bors
Copy link
Contributor

bors commented Feb 11, 2020

☔ The latest upstream changes (presumably #69030) made this pull request unmergeable. Please resolve the merge conflicts.

@andjo403
Copy link
Contributor Author

added a warning if the new passmanager is not used and llvm events is requested.
do not know if it is a good place where I trigger the warning.

@bors
Copy link
Contributor

bors commented Feb 12, 2020

☔ The latest upstream changes (presumably #69088) made this pull request unmergeable. Please resolve the merge conflicts.

@wesleywiser
Copy link
Member

Placement of the warning seems fine to me

@andjo403
Copy link
Contributor Author

the PR that this depended on have merged to master and I have now rebase onto master.
so this PR is now ready for final review.

@wesleywiser
Copy link
Member

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Feb 13, 2020

📌 Commit cec0ed0 has been approved by wesleywiser

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 13, 2020
@bors
Copy link
Contributor

bors commented Feb 13, 2020

⌛ Testing commit cec0ed0 with merge 5d04ce6...

bors added a commit that referenced this pull request Feb 13, 2020
[self-profiler] add selfprofiling to llvm

using pass name as event id and add additional data with name of module, function …

![image](https://user-images.githubusercontent.com/844398/72761970-205d8600-3bde-11ea-86de-87386e127944.png)

r? @michaelwoerister or @wesleywiser
@bors
Copy link
Contributor

bors commented Feb 13, 2020

☀️ Test successful - checks-azure
Approved by: wesleywiser
Pushing 5d04ce6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2020
@bors bors merged commit cec0ed0 into rust-lang:master Feb 13, 2020
@andjo403 andjo403 deleted the selfprofileLlvm branch February 13, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants