Merge of 310 commit(s) from Chromium's toolchain-utils

Merged commit digest:
  c88ee8a Android wrapper: Support compile with fallback.
  5322d4a toolchain-utils: Fix ListMachineStates with new locking methods
  0cfb74e afdo_metadata: Publish new profiles for kernel 4.4.
  820bffa Android wrapper: Support @param files for bisection.
  c58f8d5 Android wrapper: Add support for --gomacc-path.
  606ae84 afdo_metadata: Publish new profiles for Chrome.
  36ceb71 afdo_metadata: Publish new profiles for kernel 3.18.
  863cf12 llvm_tools: Fix error in getting a fixed SVN version.
  bbb3c81 Initial support for the android wrapper.
  0010a51 afdo_metadata: Publish new profiles for kernel 3.14.
  30a061f crosperf: Print top5 commands into log
  4713fd1 toolchain-utils: remove AFE local server code
  1125ad8 llvm_tools: add a script to `cp` files to chromiumos-overlay
  9b6b17d afdo_metadata: Publish new profiles for Chrome.
  8bb8b5b Support extra args for llvm next.
  52bf107 crosperf: Add cpu temp/freq in cwp report
  c60ec01 crosperf: mark a run as failed if samples collected is 0
  61413b9 Revert "Reland "afdo_metadata: Publish new profiles for kernel 4.4.""
  864c486 Reland "afdo_metadata: Publish new profiles for Chrome."
  960a1f7 Revert "afdo_metadata: Publish new profiles for Chrome."
  75461e9 Reland "afdo_metadata: Publish new profiles for kernel 4.4."
  5aa8241 crosperf: Fix cros lint warnings
  4d72583 crosperf: add per tag story summary when parsing histograms
  cdd9e34 crosperf: introducing new locking mechanism
  73a0d2a crosperf: Add top_interval argument to experiment
  05ee05d afdo_metadata: Publish new profiles for Chrome.
  4189445 afdo_metadata: Publish new profiles for Chrome.
  7739748 Reland "afdo_metadata: Publish new profiles for Chrome."
  3bd3fcd Revert "afdo_metadata: Publish new profiles for Chrome."
  a240369 Revert "afdo_metadata: Publish new profiles for kernel 4.4."
  b8354cc crosperf: Fix thermal failure on veyron
  003bf2d Allow to pass in argv0 from ld.so via an env variable.
  858e145 toolchain_utils: Reduce CPU freq in nightly tests
  f712607 afdo_metadata: Publish new profiles for kernel 4.4.
  f23a880 afdo_metadata: Publish new profiles for Chrome.
  483c461 afdo_metadata: Publish new profiles for kernel 3.18.
  1b3c925 crosperf: Setup CPU frequency
  67a3a58 afdo_metadata: Publish new profiles for kernel 3.14.
  802e83e clang wrappers: Use LLD as the default linker.
  a0138fb afdo_metadata: Publish new profiles for Chrome.
  6123df2 Use execve with properly merged env variables.
  3b8531f Allow to remove env variables.
  c183559 LLVM tools: Updated README.md to include auto LLVM bisection
  97c1e1c LLVM tools: Added unittest for llvm_bisection.py
  da1c1ef LLVM tools: Updated unittests for patch_manager.py
  8340fb9 crosperf: Fix unittest execution time
  9855663 crosperf: Wait for CPU cooldown and setup governor.
  d7cded2 toolchain-utils: Add CPU cool-down in crosperf experiment
  e398ca2 LLVM tools: Updated unittests for update_chromeos_llvm_next_hash.py
  723eb0f LLVM tools: Updated unittest for llvm_patch_management.py
  a7f8071 LLVM tools: Unittests for modify_a_tryjob.py
  3a15cc5 LLVM tools: Unittests for update_tryjob_status.py
  34226d1 LLVM tools: Unittests for auto_llvm_bisection.py
  4344157 LLVM tools: Unittests for update_packages_and_run_tryjobs_unittest.py
  d4475f8 Reland "Reland "afdo_metadata: Update metadata for chromeos-kernel-3_18""
  5cc635d Revert "Reland "afdo_metadata: Update metadata for chromeos-kernel-3_18""
  d0b0627 Reland "afdo_metadata: Update metadata for chromeos-kernel-3_18"
  52351ab Revert "afdo_metadata: Update metadata for chromeos-kernel-3_18"
  f783590 Reland "afdo_metadata: Update metadata for chromeos-kernel-3_18"
  29a7e82 Revert "afdo_metadata: Update metadata for chromeos-kernel-3_18"
  1acae41 crosperf: Setup CPU configuration based on 'cpu_usage'.
  9d11404 crosperf: Add dut config arguments to experiment
  0f8dae1 llvm_tools: appease pylint
  df367da llvm_tools: teach patch updating logic about google3-unstable
  fc0b318 llvm_tools: support grabbing google3's unstable LLVM
  478cfee Modify hostenv and use execv instead of execve.
  6270ccc LLVM tools: Migrated all scripts to python3
  2ad170b wrapper: add compiler_wrapper to gitignore
  8e47f36 wrapper: add chmods/umasks to double-build bits
  7d811f4 Use libc execve instead of syscall.Execve
  367e8a9 run_tests_for: unbreak it on _unittest.py files
  93ca49f llvm_tools: fix get_llvm_hash_unittest
  33150e8 afdo_metadata: Publish new profiles for Chrome.
  ad0bc96 afdo_metadata: Update metadata for chromeos-kernel-3_18
  8ff9012 LLVM tools: Added a simple custom script example
  f1c5bc9 crosperf: update skylab command line
  c856b68 LLVM tools: Added auto bisection of LLVM
  3effa06 LLVM tools: Updated README.md to include new scripts
  d8bf281 crosperf: Add support for using aquarium in Telemetry.
  bd4d706 afdo: Add metadata to represent latest Chrome AFDO artifacts.
  0263063 LLVM tools: Add extra return value for no tryjobs
  9c53f59 LLVM tools: Fixed unreferenced error
  ffed65d LLVM tools: Added support for 'skip' and executing a custom script
  329ad31 crosperf: Add jetstream2 to telemetry perf tests.
  5edca50 Only resolve cmd path against $PATH if path does not contain a folder.
  4223570 LLVM tools: Maintain up-to-date LLVM repo in 'llvm_tools'
  6277e42 Add docs how to update the ChromeOS wrappers.
  069360c LLVM tools: Change list now contains all tryjobs launched
  055838a LLVM tools: Added bisection of LLVM
  36a9ee4 LLVM tools: Display to stdout when the log level is 'verbose'
  39385f9 LLVM tools: Fixed remove patches mode when dealing with future patches
  eceb894 Capture spaces in arguments to the old shell wrapper.
  eff107c Always use /proc/self/cwd to get current directory.
  3e482f2 Only resolve symlinks for wd for /proc/self/cwd
  6a6b525 Support \ while capturing stdout / stderr.
  eede79f Support symlinks as value of os.Getwd()
  64a2ef0 toolchain-utils: replace guado_moblab with fizz-moblab
  42d0001 Use a fixed tempdir for executing the old wrapper.
  6f59a66 Only tee stdin if a "-" was passed the compiler.
  edaab0f Support "gcc", "clang" as compiler names
  2e7ed59 Fix old wrapper path for goden tests of gcc host config.
  1cd5f84 Match old wrapper for ordering of -mthumb and -fno-stack-protector
  a50a9c1 Forward os.Stdin to child processes.
  36c1921 Correctly parse eabi compiler names.
  4529f29 Support calling old wrapper with utf8 in stdout/stderr.
  d8aa0d0 Store change id as version in the config.
  1c95e74 crosperf: Add ARM CPU stats in crosperf report
  fcda3b3 LLVM tools: Moved function that retrieves latest g3 LLVM version
  3f0c075 LLVM tools: Added support for bisection of patches
  16603d5 cros_utils: add an ExitStack utility
  e66aac0 Allow arguments with spaces when comparing to the old wrapper.
  058d491 Fix build: Update goldens
  5f98f2d Resolve wrapper path against path env
  47f580f Pass the old wrapper path as a linker argument
  5fa6d24 Only evaluate one level of links for the linker
  4835337 afdo: Add a metadata file for tracking latest AFDO artifacts.
  53b185a Properly escape stdout / stderr of nested commands
  36c4a51 Minor adjustments to bundle.py and build.py
  8063d4e cros_utils: Fix blacklisted R79-12384.0.0 image
  d5ce3d7 Allow wrapper to build with cros sdk.
  1b336f8 Add more golden tests for wrapper paths
  caf583b Create a goldenfile for every section.
  b30a1ed Use static go build and allow to bundle sources.
  d2067bc LLVM tools: Assert that the scripts are not run inside the chroot
  2c8a3ad cros_utils: Add R79-12384.0.0 image to blacklist
  3fa4d02 llvm-tools: Use the chromium mirror for gettting tot hash.
  eb729be crosperf: Print traceback instead of exception type.
  e05c521 LLVM tools: Added README.md for clarification on the scripts
  e39d770 toolchain-utils: Fix argument-passing error in experiment_factory.py
  e5a8682 LLVM tools: Updated unittests for ToT option
  5248323 llvm-tools: Remove assert when stderr is non-empty.
  c369e29 LLVM tools: Added script that runs tryjobs after updating the packages
  ad16df9 Fix path for crosperf experiment files.
  db3e218 command_executer: Pass custom env in ChrootRunCommand.
  2a1663f command_executer: Allow passing custom os env.
  f650e84 Clang-Tidy: Remove clang tidy project from tc-utils
  c3c1f13 LLVM tools: Moved parsing 'llvm-svn' of a commit message to another function
  7a0f460 LLVM tools: Added default value when updating packages
  8052290 crosperf: Add "intel_pstate" and "turbostat" args
  265c296 toolchain-utils: Add no_hwp to nightly perf test
  144f699 crosperf: Setup intel_pstate
  2493f13 LLVM tools: Removed calls to g4 when retrieving latest g3 LLVM version
  1394e94 LLVM tools: Gets the latest git hash from ToT of LLVM
  8231d4f LLVM tools: Unittests for update_chromeos_llvm_next_hash.py
  d8845f4 LLVM tools: Unittests for llvm_patch_management.py
  7abb7aa LLVM tools: Unittests for patch_manager.py
  41b6b6f LLVM tools: patch management for LLVM and patch manager
  46c8b28 crosperf: check skylab tool exists or not for skylab mode
  e15a4c0 AFDO-Bisect: Add user documentation
  3affd69 crosperf: Add cpu statistics into results report
  e2fe0ae crosperf: Fix pylint warnings
  d3466be toolchain-utils: add block list for histograms output
  2b4238f Toolchain-utils: update crosbolt list
  feaabc9 Toolchain-utils: replace xrange with range on results_cache.py
  9a6dae8 toolchain-utils: remove all xranges
  adcb8bf AFDO-Bisect: Remove separate parsing module
  73ed016 AFDO-Bisect: Write test confirming assumptions re state saving
  8e8a076 LLVM tools: Changed comment after 'LLVM_NEXT_HASH'
  d6e082d toolchain-utils: update crosbolt benchmarks
  1c490cd crosperf: Init workflow to use skylab to run tests
  7aa250e crosperf: introduce skylab field and pass to experiment and label
  d6b6166 crosperf: Remove unsupported machines.
  d8ce1d6 AFDO-Bisect: Exit analysis on problem_status exit code
  0e39ab7 toolchain-utils/llvm_tools: fix a bug overwriting chroot path
  b27c8f2 Support gcc host wrapper.
  31dec2c Support clang host wrapper.
  e23905c Sync with recent changes to old wrapper.
  cfa8c24 Add license headers to all go files.
  8ff7903 Toolchain-Utils: Fix bug when no files to lint/check
  e78ad67 Toolchain-Utils: Only lint existing files
  d8b3f5e AFDO-Bisect: Implement state-saving
  3d89c0b Create golden tests for sysroot wrapper.
  198a3c9 Fix minor bugs
  22c32b4 Add json mapping for command and commandResult.
  0fc0acd Remove unused code
  38999a5 DebugInfoTest: Whitelist fw_parser
  79122e7 AFDO-Bisect: Make range search bisect O(logn) instead of O(n)
  cf65aac pgo_tool: Fix bugs in pgo_tool and add a README file
  85a91c5 heatmap: Fix symbolization of hot pages in heatmap tool.
  5442a25 Toolchain-utils: Remove peach-pit from nightly builder
  bb3993a AFDO-Bisect: Initial draft of analysis algorithm
  5847281 Add -print-cmdline and -print-config
  6652ca3 LLVM tools: Unittests for update_chromeos_llvm_next_hash.py
  f3bf303 LLVM tools: updates the LLVM next hash of a package or packages
  9780ea9 Add support for calling bisect driver
  9d60930 Support resource usage logging
  9332d21 Unify command error handling
  4044dab crosperf: Fix a typo in kernel kallsyms.
  bea1af9 toolchain-utils:fix a typo
  eb306fa crosperf: Recover intel_pstate performance setup
  f6d9f4f Support second execution of the compiler with -Wno-error
  21b9435 owners: split out the actual email list into OWNERS.toolchain
  214078c toolchain-utils: migrate Telemetry tests results from chartjson to histograms
  38f3c42 Support calling clang-tidy in the compiler wrapper.
  d868417 Support -clang-syntax flag in the compiler wrapper.
  7727c9f LLVM tools: Unittests for get_llvm_hash.py
  6befccf LLVM tools: get hashes from google3
  900dbc9 Introduce infrastructure for calling and testing nested commands, error messages and exit codes.
  739e6ab toolchain-utils: Replace dead boards from toolchain test
  46751c1 AFDO-Bisect: Write a (very) basic AFDO prof parser
  5a14390 toolchain-utils: enable crosperf for llvm-toolchain images
  aa31116 Allow to pass in the use_ccache via go build.
  b9992bb toolchain-utils: Add a script to do post-process on Chrome orderfile.
  7f18670 Call go fmt, go lint, go test and go vet (via go test) during presubmit and git hooks.
  ef8f969 Initial version of a go version of the compiler wrapper.
  87d457d Update OWNERS file.
  782bff3 Clang-Tidy: Fix the HTML heading
  9d57640 Revert "toolchain-utils: Temporarily uses chrome head"
  20a7c6f Clang-Tidy: Add code search links to warnings HTML
  7191649 Clang-Tidy: Fix generation of csv to protobufs
  00c84a4 clang-tidy: Add warnings_pb2.py to clang-tidy work repo.
  a16e5cd Clang-Tidy: Refactor Severity class into tuples
  7355db0 Clang-Tidy: fix small typo in protobuf generation
  4777b7b Clang-Tidy: remove CSV generation functionality
  016f3e0 Clang-Tidy: Make .proto conform to best practices
  c5c709d Clang-Tidy: Fix nits to generating protobuf CL
  33b509f Clang-Tidy: Remove the global variable args
  441c6bc toolchain-utils: Temporarily uses chrome head
  fdf084c Clang-Tidy: Fix warning protobuffer imports
  1bba5a6 pgo_tools: make the uploader check new uploads
  0635efd pgo_tools: make our profile uploader use hashes in file names
  5c24df5 Clang-Tidy: Generate protobuf of build warnings
  e1b7b22 Clang-Tidy: Further breaking the project names
  b551ef7 Clang-Tidy: Add more specific projects
  7f5a10c Clang-Tidy: ignore some redundant warnings
  6be180e Clang-Tidy: insert more ChromeOS specific projects
  985fc23 Clang-Tidy: insert ChromeOS specific projects
  2933723 Clang-Tidy: refactoring clang_tidy_warn.py
  11da726 Clang-Tidy: removing Java-specific warnings
  a2668a4 Clang-Tidy: adding tests, refactor long functions
  66b7798 pgo_tools: update our merging script to point to the right bots
  67478b3 crosperf: Stop setting cpu governor.
  885d08a crosperf: Set governor to powersave.
  05ab5dd crosperf: Add check core online in PinGovernerFrequency().
  3f06bf5 toolchain-utils: Improve heatmap tool.
  adb9f7a clang_tidy: DCE and simplify
  f7e10ed clang_tidy: exit with an error code if clang-tidy fails
  8ce23df clang_tidy: import warn.py from Android
  61ce52c clang_tidy: move scripts from sys-devel/llvm
  9506af1 rotating builders: Replace asuka with sentry, remove daisy_skate.
  1d1de43 crosperf: Reboot dut even if checksums match.
  3663e85 crosperf: Use --fast to prevent copying sysinfo for telemetry_Crosperf
  0f6b248 toolchain-utils: Fix heatmap generator to read broken perf.data because of anonymous region.
  1f0302d toolchain-utils: Update list of toolchain boards for testing.
  ced8957 crosperf: generate perf report with correct debug files
  5ed02e0 toolchain-utils: Script to merge profdata and upload to gs bucket
  d79abc9 test data cleanup: also delete CrAU_* files
  7a9397f Fix 'result' variable referenced before assignment issue
  3e36a69 githooks: make the test runner run on presubmits
  9d74464 crosperf: make run_tests use our new test runner
  449a4a1 Add AFDO generation scripts
  fd66b96 crosperf: Include score into the result of speedometer2.
  cca93c3 rotating builders: Replace daisy with daisy_skate, peppy with leon.
  3cef316 setup_board: Update usages
  cbfa536 crosperf: Fix the name of amean column for weighted results
  78eb66d [githooks] Add a test runner
  1a5a316 crosperf: Feature to ignore min and max value in results
  6512f0b crosperf: Add unittest for disable ASLR CL
  ca7fa05 [githooks] Refactor/rename check-style; NFC
  b75a3e7 [githooks] Fix the check-style hook
  00e1147 Remove run_tests
  00050c9 Swap READMEs to markdown
  d034813 toolchain: Increase number of iterations in toolchain nightly tests.
  e3be45d crosperf: do not put key 'samples' in result.keyval when test failed
  d8beb17 crosperf: enabling result caching for cwp mode
  a1a4311 crosperf: replace cpu cycles in report with samples
  cd2cf15 rotating builders: Drop cheza and add kevin64.
  21498ea toolchain-utils: Launch tryjobs from chroot.
  3edb0f5 crosperf: Disable ASLR in crosperf by default
  06275b2 crosperf: in cwp mode, first check whether iterations are the same
  b1cba79 [toolchain-utils] Increase timeout for tryjobs.
  1bc9e7c crosperf: allow weight in cwp approximation larger than 1
  1f3c5d0 toolchain-utils:  Fix the testing patches for Go.
  42199fa crosperf: fix bug in perf table generating
  5e390bb toolchain-utils: Update scripts for testing Go compiler.
  9bc678e toolchain-utils: Remove 'link' board from our tests.
  ea973ec git-hooks: support linting outside of the source tree
  56620aa git-hooks: swap to `[[`; fix style nits
  85214fa build_tool: Fix amd64-host board building
  34b4506 toolchain-utils: make repo do presubmit checks
  e136e0a toolchain-utils: add a `cros lint` git hook
  ee75294 toolchain-utils: Refine heat map tool for Chrome
  c100127 toolchain-utils: swap git hooks to use yapf
  0e74b9b toolchain-utils: add a top-level `yapf` file
  2639395 crosperf: unit test for CPU cycles table generator
  ad8b237 crosperf: Fix bugs and nit in report generation
  f7f2b87 crosperf: Generate report for cwp approximation
  219e3b7 toolchain-utils: Add loading.desktop@@typical to nightly tests.
  ef4b788 Revert "[toolchain-utils] Add tryjob flags to build Chrome from 9999 ebuild."
  5192d7f crosperf: fix cpu_cycles in result_cache
  b0ffeed [toolchain-utils] Add AFDO profile redaction script
  c1baa8d toolchain-utils: Handle the missing artifact_url error more gracefully.
  6535cc8 crosperf: make cwp_dso only work for run_local=False
  5cc59a8 [toolchain-utils] Increase timeout for buildbot tryjobs.
  115acfa [toolchain-utils] Add tryjob flags to build Chrome from 9999 ebuild.
  f1a38c2 crosperf: collect CPU cycles for CWP approximation
  e2b0d3e crosperf: Passing dso and weight to result_cache.py
  69c558b crosperf: do not allow more than one story tags in test_args
  1a199b1 crosperf: introduce cwp_dso and weight for CWP approximation
  aa8d023 Crosperf: Treat benchmarks with story- test_args as different benchmarks
  d87bc2f Crosperf: Update board list for crosperf unit test
  265c5ac crosperf: move all_crosbolt_perf benchmark to telemetry_crosperf suite
  9e47c31 bisect tool: Adding unit tests for pass/transform level bisect
  3abfae9 Bisect tool: Use symbolic link for replacing object files on Android
  b54e42c build_go: change ABI name for ARM32
  8ba65ad Fix 'from' field for sendgmr emails.
  3be25c3 Bisect tool: Support print IR differences before and after bisection
  fac6456 Rotating builders:  Replace zoombini by cheza.
  6b067ab Fix bisect_driver.py for Android pylint.
  8c95dfc bisect tool: Add README file for pass level bisection

Change-Id: I8181c8335160b6139533a62b4dcc50206eb92126