aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-12LLVM tools: Assert that the scripts are not run inside the chrootSalud Lemus
BUG=None TEST=Scripts terminated when ran inside the chroot Change-Id: Id7060ca6554a05f158160e73759763663dec1ce9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1742544 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-11cros_utils: Add R79-12384.0.0 image to blacklistDenis Nikitin
R79-12384.0.0 image was made by mistake and way ahead of current master revision numbering. This makes the image always the latest one until R79 branch is released. The change blacklists "R79-12384.0.0" image when searching for the latest one in chromeos-image-archive. BUG=chromium:992242 TEST=not tested Change-Id: I45be6441f54d642dd2636b5231114e95faf491a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1745544 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-08-10llvm-tools: Use the chromium mirror for gettting tot hash.Manoj Gupta
We were querying github to get the tot git hash. However, the ebuilds use the chromium mirror for llvm sources. As the mirror can be behind github, it caused a version skew where the sources could not be checked out to the desired tot hash. BUG=None TEST=update_packages script. Change-Id: I6510213f8de2ea29b26f46741a5da7b4c81f59e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1747167 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-09crosperf: Print traceback instead of exception type.Tiancong Wang
I found that the error message of crosperf is sometimes frustrating that when you trigger an exception somewhere in the crosperf tool, it will always return the exception type. Sometimes it's really hard to find out where the exception/error happens in your code. I think it might make sense to handle all exceptions with a try...except block, to make the error message always appear at last, so raising the original exception prints whole traceback, instead of dropping it to general SystemExit. BUG=None TEST=Tested locally, and added unittest. Change-Id: Id772af444bf3788011c74504c71939d2514f1752 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1743146 Commit-Queue: Tiancong Wang <tcwang@google.com> Tested-by: Tiancong Wang <tcwang@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-07LLVM tools: Added README.md for clarification on the scriptsSalud Lemus
BUG=None TEST=None Change-Id: Ie112596f6297d5b60346e85bda45aa41284ecbf5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1740547 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-07toolchain-utils: Fix argument-passing error in experiment_factory.pyCaroline Tice
Fix all calls to Benchmark inside experiment_factory.py to pass all args, to prevent an arg with a default value accidentally being passed a value for a different arg. BUG=chromium:991396 TEST=Tested locally with Crosperf and it worked properly. Change-Id: Ia8096e2989e179723e122090ea40a11747070b22 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1740646 Reviewed-by: Zhizhou Yang <zhizhouy@google.com> Tested-by: Caroline Tice <cmtice@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
2019-08-07LLVM tools: Updated unittests for ToT optionSalud Lemus
BUG=None TEST='./update_chromeos_llvm_next_hash_unittest.py' and './llvm_patch_management_unittest.py' pass Change-Id: I59bb1f8a1be5610c3a2c64b365392c07e95f97fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1739606 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-06llvm-tools: Remove assert when stderr is non-empty.Manoj Gupta
stderr often can have a non-empty value. e.g. On my machine, I got: WARNING cros_sdk:enter_chroot: Gclient cache dir "/tmp/git-cache" is not a directory. Therefore remove the assert for empty stderr. BUG=None TEST=No asserts Change-Id: I9f175aca9bbcee2acbb77bacfd8806de985d3447 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1738324 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-06LLVM tools: Added script that runs tryjobs after updating the packagesSalud Lemus
BUG=None TEST=Ran the script and a CL was generated for ToT correctly and two trybots were created, one for kevin and one for nocturne Change-Id: I856c23d4368f5e45d9837e6f4341ae1f97f8f136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1733650 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-04Fix path for crosperf experiment files.Caroline Tice
The pathname used to be relative to the location of chromeos_root, but that stopped working when we moved chromeos_root and made it a symbolic link. This CL fixes the path, using the correct absolute path prefix (no symbolic links). BUG=chromium:990427 TEST=None Change-Id: I0c2bc452934c7609fdcbda8bb6ce65762ac9ca2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1733648 Reviewed-by: Tiancong Wang <tcwang@google.com> Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-08-02command_executer: Pass custom env in ChrootRunCommand.Manoj Gupta
Previous CL:1733646 missed the case of ChrootRunCommand. Add the custom env to it as well. BUG=None TEST=unit tests. Change-Id: I3e09d89cb40550d52de3d880c6b6b4d6f0e71d64 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1733649 Reviewed-by: Zhizhou Yang <zhizhouy@google.com> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-02command_executer: Allow passing custom os env.Manoj Gupta
It is currently tedious to pass custom env variables to command executer e.g. when there is a need to pass an env variable for use inside chroot command. Allow passing an env variable directly to command_executer. Includes formatting changes done by running yapf. BUG=None TEST=unit tests Change-Id: I1bd286b89f3938c1c2e8384c2b9f3bdea05f3dd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1733646 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-02Clang-Tidy: Remove clang tidy project from tc-utilsEmma Vukelj
This CL removes all files related to the Clang Tidy Warnings for Chrome in Chrome OS project from toolchain-utils, as these files have been migrated to google3 and will now be run by a borg job rather than by the Chrome OS builder. BUG=None TEST=None Change-Id: If656b967f7f56998754667e0eac1eba11e3b619f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1711060 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-08-02LLVM tools: Moved parsing 'llvm-svn' of a commit message to another functionSalud Lemus
BUG=None TEST='./get_llvm_hash_unittest.py' passes Change-Id: I7cbb34a9e7924104aaa5934ca2156f547f421450 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1731735 Tested-by: Salud Lemus <saludlemus@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-02LLVM tools: Added default value when updating packagesSalud Lemus
BUG=None TEST='./update_chromeos_llvm_next_unittest.py' passes Change-Id: I6701bfe2472e2bbec2d791f6f044d14bfe483195 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1732430 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-02crosperf: Add "intel_pstate" and "turbostat" argsDenis Nikitin
In global setting added "intel_pstate" option. Type: string. Values: active, passive, no_hwp, ''(equivalent to active). Default ''. In benchmark setting added "turbostat" option. Type: boolean. Default True. BUG=chromium:966514 TEST=tested on samus, eve, rammus Change-Id: I1533c6d6586aab5acf3665bce68920a0ab3092bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1726635 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Commit-Queue: Sean Abraham <seanabraham@chromium.org> Reviewed-by: Sean Abraham <seanabraham@chromium.org> Tested-by: Sean Abraham <seanabraham@chromium.org>
2019-08-02toolchain-utils: Add no_hwp to nightly perf testDenis Nikitin
Added --no_hwp argument to crosperf to run benchmark tests with intel_pstate=no_hwp kernel command line option. The option disables Intel's HW control of CPU frequency. CPU freq drops to fixed base frequency. BUG=chromium:966514 TEST=tested on samus, eve, kefka, rammus, scarlet, nami. Cq-Depend: chromium:1726635 Change-Id: I6ec2b5b04a4101d4c8ef7c0fbc5acc43f439275f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1732431 Reviewed-by: Denis Nikitin <denik@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org>
2019-08-02crosperf: Setup intel_pstateDenis Nikitin
Setup intel_pstate in kernel command line to a value from global settings "intel_pstate" argument (default ''). Added crosperf "--no_hwp" argument for a shortcut change. Kernel command line will be updated only if hwp is supported by CPU. Intel_pstate HWP feature can be disabled via kernel command line argument intel_pstate=no_hwp. See https://www.kernel.org/doc/html/v4.12/admin-guide/pm/ intel_pstate.html#kernel-command-line-options-for-intel-pstate BUG=chromium:966514 TEST=tested on eve, rammus (supported), kefka, samus (not supported), scarlet (arm). Change-Id: Id6b7cf7e230e17788c1024da2aacbc9a16b7ac8e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1711517 Commit-Queue: Denis Nikitin <denik@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Denis Nikitin <denik@chromium.org>
2019-08-01LLVM tools: Removed calls to g4 when retrieving latest g3 LLVM versionSalud Lemus
BUG=None TEST=Ran the script and the correct g3 LLVM version was returned Change-Id: I37847c56b1f72f3ceadc9e5fb7171faae273203c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1729508 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-01LLVM tools: Gets the latest git hash from ToT of LLVMSalud Lemus
BUG=None TEST='./get_llvm_hash_unittest.py' passes Change-Id: I6c5a58b82811f2d3abe8d377651f0036fa1bc491 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1724419 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-01LLVM tools: Unittests for update_chromeos_llvm_next_hash.pySalud Lemus
Updated and added unittests for the script now that the script calls a script that setups up the arguments for the patch manager. BUG=None TEST='./update_chromeos_llvm_next_hash_unittest.py' passes Change-Id: If16797725818d9f3c08c9e030e870e6bdbc3c83b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1719774 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-01LLVM tools: Unittests for llvm_patch_management.pySalud Lemus
BUG=None TEST='./llvm_patch_management_unittest.py' passes Change-Id: I03cb727669039c9f89431ceec34c32d5d940777b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1717250 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-01LLVM tools: Unittests for patch_manager.pySalud Lemus
BUG=None TEST='./patch_manager_unittest.py' passes Change-Id: I66235de2153bb32160d7ce301a86a246cef967a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1719213 Tested-by: Salud Lemus <saludlemus@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-08-01LLVM tools: patch management for LLVM and patch managerSalud Lemus
The script 'llvm_patch_management.py' constructs the arguments for the patch manager to handle patches of a package. The script 'patch_manager.py' is the patch manager. The patch manager has different modes to handle all applicable patches that fail to apply. The mode 'bisect_patches' is a WIP. BUG=None TEST=Created a json file that has the patches of the LLVM ebuild and used the default failure mode of the patch manager. All patches applied successfully for r365631. Change-Id: I42f339ac0bb7c35d70a96cc0c2daeb470336b13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1708223 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-08-01crosperf: check skylab tool exists or not for skylab modeZhizhou Yang
This patch checks whether skylab tool is installed when skylab mode is specified. After installing it, it requires user to login the tool manually for the first time since there is no way to do it automatically. BUG=chromium:984790 TEST=Tested locally and passed unittest. Change-Id: Iff03ed0552127837264d8437e2b73346f1abdbd4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1727264 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-07-29AFDO-Bisect: Add user documentationEmma Vukelj
This CL adds a README containing some information about what the script does, what the arguments are, and how to invoke it, for user benefit. BUG=None TEST=None Change-Id: I909c75e35545c7049b030fde2d080f6466addabe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1718885 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-28crosperf: Add cpu statistics into results reportDenis Nikitin
Check for turbostat.log file in results directory and if file exists parse the context and extract measurements of CPU Frequency and temperature for ALL cores (not each). Keys added to keyvals: 'cpufreq_min', 'cpufreq_max', 'cpufreq_avg', 'cputemp'. BUG=chromium:966514 TEST=tested all crosbolt perf benchmarks Change-Id: If90d26664c70ccb73750f17573b89933fdb048f4 Reviewed-on: https://chromium-review.googlesource.com/1709824 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Ready: Denis Nikitin <denik@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-07-26crosperf: Fix pylint warningsDenis Nikitin
Pylint throws a bunch of warnings on results_cache.py and results_organizer.py (other source files not checked). The change fixes most warnings EXCEPT docstring which would require more elaboration. BUG=none TEST=presubmit passess Change-Id: I4e48d94c9b430d8b224e70e9267abe3795bff7cc Reviewed-on: https://chromium-review.googlesource.com/1719770 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Ready: Denis Nikitin <denik@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-25toolchain-utils: add block list for histograms outputJian Cai
Histograms of some tests such as loading.desktop are very different from their chart-json counterpart. It seems it is almost impossible to parse these tests without case-by-case parsing. Parse chart-json output of these tests instead. BUG=chromium:984713 TEST=local tests Change-Id: I225567a1be9d401b5dd0c1f682184e581ac4acce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1714125 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2019-07-25Toolchain-utils: update crosbolt listJian Cai
Move loading.desktop and rendering.desktop from crosbolt_perf_tests to telemetry_crosbolt_perf_tests. Otherwise test_that does not pass correct suite type. BUG=chromium:970061 TEST=local tests Change-Id: I485335fd285d0e132e0d7a2fe309a6303931de56 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1717127 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Jian Cai <jiancai@google.com>
2019-07-25Toolchain-utils: replace xrange with range on results_cache.pyJian Cai
xrange builtint is replaced by range on Python3. Use range instead of xrange on results_cache.py. BUG=chromium:986617 TEST=local tests Change-Id: I729b12a92b75dbd355fad3012205765a648be538 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1717449 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-25toolchain-utils: remove all xrangesGeorge Burgess IV
This removes all mention of xrange from toolchain-utils (modulo ones being changed in other CLs that are in flight). It's now an apparent lint error to use xrange, and it hinders our move to python3. As commented on If90d26664c70ccb73750f17573b89933fdb048f4, xrange -> range in python2 is really only a space concern (or speed in pathological cases), so migrations of this nature are generally super straightforward. I glanced at each of these callsites, and none of them appear to be pathological, so my hope is that this should all be Just Fine :) (Also fun to note that this includes a .diff file that has python code embedded in it.) BUG=None TEST=Presubmit tests Change-Id: Ic9f3ac3a5044d7a07da8a249bc505278d98203de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1717130 Commit-Queue: George Burgess <gbiv@chromium.org> Commit-Queue: Luis Lozano <llozano@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2019-07-24AFDO-Bisect: Remove separate parsing moduleEmma Vukelj
The initial parsing was written as a separate module imported by the main analysis and the tests. This is pretty unnecessary since it is only one relatively small function, and so this CL consolidates that code into the main functionality (and updates the tests to reflect this). BUG=None TEST=All existing tests succeed. Change-Id: I1d6ac4cf0abdbcdf7b837492580887d08d007bad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1716324 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-24AFDO-Bisect: Write test confirming assumptions re state savingEmma Vukelj
This CL adds a test which confirms that the state saving used correctly produces the same exact profiles as if the run went straight through. BUG=None TEST=All tests, new and old, pass. Change-Id: I250bbf051165deeb673dedc61b3c6e6904cf4875 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1713235 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-23LLVM tools: Changed comment after 'LLVM_NEXT_HASH'Salud Lemus
Some unittests were changed as well to affect this change. BUG=None TEST='./update_chromeos_llvm_next_unittest.py' passes Change-Id: I179ae679eaac7f34c72c688e6ed15af79d8d6749 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1714124 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Salud Lemus <saludlemus@google.com>
2019-07-23toolchain-utils: update crosbolt benchmarksJian Cai
Current crosbolt benchmarks we run are out-of-date. Update the list to keep up with go/crosbolt. BUG=chromium:970061 TEST=localtests Change-Id: Ib572a68257a23cc32d7211bfbfbf4cebfd3f89c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1700150 Reviewed-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Jian Cai <jiancai@google.com>
2019-07-22crosperf: Init workflow to use skylab to run testsZhizhou Yang
This patch provides init workflow to use skylab to run both original test_that test (aka. client test) and telemetry_Crosperf test. This patch also removes telemetry_run since no one uses it any more. This patch will: 1) Launch skylab to create test to run on specific remote(s). 2) Wait until test finishes, and download results from gs location. 3) Skipping afelock system for lab machines. This patch is missing a lot of important concepts for our final goal, marking them as TODO in the patch. TEST=passed all unittest. BUG=chromium:984790 Change-Id: I7d0d15e67e4610d42ff84aa3fe2f1f1ac90fc1bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1707928 Reviewed-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-07-22crosperf: introduce skylab field and pass to experiment and labelZhizhou Yang
This is the initial patch to migrate crosperf from autotest to skylab for lab runs. This patch introduces skylab field in experiment, parsed it in settings_factory and restructured label class and experiment class so that further steps can use skylab field. TEST=Passed all unit tests BUG=chromium:984790 Change-Id: I1104fea739977c522938790012f4f3f522f9d65f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1705234 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-07-22crosperf: Remove unsupported machines.Manoj Gupta
Remove machines that are now unsupported. BUG=None TEST=None Change-Id: Id8173260ab95f211021f0503ad8d6748af869213 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1712452 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-22AFDO-Bisect: Exit analysis on problem_status exit codeEmma Vukelj
This CL makes it such that if the user-provided external script returns PROBLEM_STATUS indicating that something went wrong (e.g. user sent SIGINT, or some part of script crashed), then the analysis raises an error stating so and terminates analysis. Receipt of the problem status code is not persisted in the state file. BUG=None TEST=Existing tests and added test confirming error raising all pass. Change-Id: Ie2ca6c608ed01b3717d5f09495660f99c3a5e05a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710021 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-22toolchain-utils/llvm_tools: fix a bug overwriting chroot pathZhizhou Yang
In the original code, the chroot_path will be overwriten by stdout, and if there are multiple entries in package_list, the second run will fail because chromeos_root is not correct. TEST=Tested with ./$SCRIPT --update_packages sys-devel/llvm sys-libs/compiler-rt BUG=None Change-Id: I2a9b924ed44f648bc5a27e8633fcf1e9c43819d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1711160 Tested-by: Zhizhou Yang <zhizhouy@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
2019-07-22Support gcc host wrapper.Tobias Bosch
This change adds support for the gcc host wrapper. The implementation is verified via comparing to the old gcc host wrapper in the golden tests. BUG=chromium:773875 TEST=unit test Change-Id: I3af98b81dba6d9299183db01e967003be860972c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710537 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-22Support clang host wrapper.Tobias Bosch
This change adds support for the clang host wrapper. The implementation is verified via comparing to the old clang host wrapper in the golden tests. BUG=chromium:773875 TEST=unit test Change-Id: I48284736014ab4b66bfd7e31e88ffd23956007bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1708750 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-22Sync with recent changes to old wrapper.Tobias Bosch
Old wrapper changes: https://chromium.git.corp.google.com/chromiumos/overlays/chromiumos-overlay/+/bebf19ee4322c26d7cb548c8f4419dfe1c6e3c11 https://chromium.git.corp.google.com/chromiumos/overlays/chromiumos-overlay/+/cc6e225d3894f99b320584b2f41ff6a68f76d6a7 BUG=chromium:773875 TEST=unit test Change-Id: I927bcb6082d1b67ca9efde0001e43e0a0a36c3b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710403 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-22Add license headers to all go files.Tobias Bosch
Required as of https://chromium.git.corp.google.com/chromiumos/repohooks/+/9732e38a5551e4bbcd222d2bbb89ee0fc5c95dee BUG=chromium:773875 TEST=unit test Change-Id: I8dfed85b0fbd528084ff2e585bbf3624ac358135 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710404 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-19Toolchain-Utils: Fix bug when no files to lint/checkEmma Vukelj
This CL fixes a bug in the previous one editing pre-submit which caused presubmit to fail when no new files have been added. BUG=None TEST=created new branches, confirmed presubmit is run correctly Change-Id: I1a1b968220e60db12d05bbdab25646bfe2eb42e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710022 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-19Toolchain-Utils: Only lint existing filesEmma Vukelj
This CL changes the presubmit hook to only lint files that exist, to avoid trying to lint files that a CL removed and failing fatally. BUG=None TEST=created new branch, confirmed existing files are linted and deleted files are not. Change-Id: Ie812914fb2b33de75cda5a036df18750dcc6e6bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1710018 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-19AFDO-Bisect: Implement state-savingEmma Vukelj
This CL adds state-saving functionality to this AFDO profile analysis tool. It introduces two new flags: state_file, and no_resume. The former allows the user to specify a specific state file for initial state-loading, and state-writing on each iteration. If this flag is not provided, a default file in the current working directory is used. The no_resume flag allows the user to disable initial state loading, beginning a fresh run of the script. TEST=All added tests pass BUG=None Change-Id: Ib288180dc6ca15d47e2720f222905e2aa6b964a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1708215 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-18Create golden tests for sysroot wrapper.Tobias Bosch
- Golden files can be updated via the new "-updategolden" test flag. - Golden files contain the wrapper command, commands executed by the wrapper stdout, stderr, exitcode of the wrapper - The commands in the golden files are also compared to the old wrapper to make sure they are correct. We are also mocking less things in the old wrapper now, allowing to compare against differnet wrappers via golden tests in the future (e.g. clang_host_wrapper). - Unit tests are no longer diffing against the old wrapper. BUG=chromium:773875 TEST=unit test Change-Id: I0755bfe11cd499474820c9354412d39a0fa04401 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1702633 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-07-18Fix minor bugsTobias Bosch
These bugs were detected while creating golden tests and comparing them to the old wrapper (see next commit). Also makes flag order in old wrapper deterministic by replacing sets with a SetList class that is based on a list. BUG=chromium:773875 TEST=unit test Change-Id: I8e2680f732577f1f590042f1ccd589dfedadd6ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1706791 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>