aboutsummaryrefslogtreecommitdiff
path: root/afdo_tools
AgeCommit message (Collapse)Author
2020-02-13toolchain-utils: migrate all in-use projects to python 3Zhizhou Yang
This patch migrates all in-use projects left to python 3. BUG=chromium:1011676 TEST=Passed unittests and launched scripts manually. Change-Id: I7f2de4e1131c05bacfac80667f3064da8adaebfd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2051397 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
2019-10-17afdo_bisection: make docs slightly more helpfulGeorge Burgess IV
BUG=None TEST=None Change-Id: I81c38a80d7b84ac4ae65a3e75b232a0131a3f5ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1846266 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2019-10-17afdo_bisection: remove absl dependencyGeorge Burgess IV
absl isn't available outside of the chroot, which makes using this script pretty difficult in some cases. The dependency isn't necessary (we only care for flags), and it's probably better if we parameterize functions/objects on the things they depend on, rather than having them reach into FLAGS. BUG=None TEST=Ran the tests Change-Id: Ic535b92ce580071ab5a346cde76f201941a748ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1839618 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: George Burgess <gbiv@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-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-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-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-17AFDO-Bisect: Make range search bisect O(logn) instead of O(n)Emma Vukelj
This CL changes the formerly-titled 'non_bisecting_search' to run faster by using bisection, and has thus been renamed to 'range_search' because it searches for a range of problematic functions. This CL also adds some basic status logging for the user's benefit. Change-Id: Ib37dd4817665f8378bfcc1335a2e82367d73db4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1703125 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-07-15AFDO-Bisect: Initial draft of analysis algorithmEmma Vukelj
This CL is an initial draft of the AFDO profile analyzer at the heart of this project. It employs three different sorts of analysis (bisecting search, non-bisecting search, and by function diffs). BUG=None TEST=All added tests succeed. Change-Id: If584f30ef5a208c3da71123fe9212d8c3eac89c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1687775 Reviewed-by: Caroline Tice <cmtice@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-06-28AFDO-Bisect: Write a (very) basic AFDO prof parserEmma Vukelj
This CL introduces a script which does very basic parsing of AFDO text-based profiles which associates each top-level function with its associated profile data. BUG=None TEST=The added test is successful. Change-Id: I6c8d3b3b1049b81a5890cc9699e2798dda641eb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1679371 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Emma Vukelj <emmavukelj@google.com>
2019-03-28Add AFDO generation scriptsGeorge Burgess IV
People want to generate AFDO profiles, which is a somewhat error-prone and complicated process for a few reasons. So, have two scripts. The first of these allows you to easily generate an AFDO perf profile on a trybot. The second gives you a convenient way to turn that into an AFDO profile. Both have accompanying documentation, so the hope is that they're usable. BUG=None TEST=None Change-Id: I4afb665ffc8550c718b3867ca3d5b98aa4cd0901 Reviewed-on: https://chromium-review.googlesource.com/1526721 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>