aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'aosp/upstream' into masterHEADn7.1Dan Willemsen2017-07-273-12/+113
| | | | | | | | | | * aosp/upstream: Fix (cd <symlink>; find .) Add some simple find unit tests Bug: 64041576 Test: Compare internal master build-aosp_arm.ninja before/after Change-Id: Ib29cf0dbb25a3f08c26520070cf53cdd912c0695
* Add OWNERS in build/katiChih-Hung Hsieh2017-06-151-0/+3
| | | | | | | | | | * Owners are selected from top CL approvals or owners. They will be suggested to review/approve future CLs. * OWNERS files are recognized by the new find-owners plugin, see .md files in https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/ Test: build/make/tools/checkowners.py -c -v OWNERS Change-Id: I561995014ed2d9a6eb9f51fcbe2fdd61dbce9337
* Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2017-05-236-16/+124
|\ | | | | | | | | | | | | | | * aosp/upstream: Add --werror_find_emulator, --werror_overriding_commands Test: Upstream tests Change-Id: Ibd1c8ab9945d38543088f99b2532514ea8a9d7f6
| * Merge pull request #117 from danw/WerrorShinichiro Hamaji2017-05-236-16/+124
| |\ | | | | | | Add --werror_find_emulator, --werror_overriding_commands
| | * Add --werror_find_emulator, --werror_overriding_commandsDan Willemsen2017-05-226-16/+124
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Android builds, we'd like to start removing some of the default warnings and turn them into errors so that they can't come back. For find emulator, we could attempt to check for errors, or silence every find command in the tree, but that doesn't particularly scale, especially when new code gets added with warnings. We've gone through and fixed many of these, but they keep coming back, so add --werror_find_emulator so that when we fix them all we can prevent them from coming back. Overriding commands is similar -- we really don't want multiple rules defining a single output file. In ninja we've turned on -w dupbuild=err, but if the paths happen to be identical the makefile overriding logic kicks in first and presents a warning instead of an error. So add --werror_overriding_commands in order to turn the make warning into an error.
* | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2017-05-191-1/+1
|\| | | | | | | | | | | | | | | | | * aosp/upstream: Ignore EACCES during find emulator opendir Bug: 37553659 Test: mkdir -p out2/a; sudo chown nobody:nobody out2/a; m -j Change-Id: Ibc038a8658242e123815ef9de39891e0ee622b57
| * Merge pull request #116 from danw/find_eaccesShinichiro Hamaji2017-05-131-1/+1
| |\ | | | | | | Ignore EACCES during find emulator opendir
| | * Ignore EACCES during find emulator opendirDan Willemsen2017-05-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | In addition to the race conditions that led me to whitelist ENOENT when we're initializing the find emulator, also whitelist EACCES. The reported usecase was when two users are using the same source directory, but compiling into two out directories under the same source directory. The permissions were set up so that they didn't have access to each others out directories, so kati would get permission denied errors. Test: mkdir -p out2/a; sudo chown nobody:nobody out2/a; <run>
* | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2017-02-2432-99/+287
|\ \ | | | | | | | | | | | | | | | am: 341a2ceccb Change-Id: I4aae5b2b678f9a9a35dc2e91bb53664fa3238c7b
| * | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2017-02-2332-99/+287
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aosp/upstream: Randomize cpu affinity Be more resilient to directories disappearing during startup Pass a Loc into FindEmulator for better warnings Add --color_warnings to make warnings/errors like clang [AUTHORS] Fix kati instead of glog Add Koichi Shiraishi to AUTHORS/CONTRIBUTORS [C++] add +build ignore magic comment for go build [go] fix ldflags foramt to add '=' for -X flag [go] fix stat.Dev type to uint64 Allow rules to specify custom ninja pools Fix some possible performance issues found by clang-tidy Test: kati tests Test: multiproduct_build on aosp Change-Id: I4c427dde2bb9d1a0970e97d1e822e093bd269dfe
| | * Merge pull request #112 from danw/random_affinityDan Willemsen2017-02-231-4/+18
| | |\ | | | | | | | | Randomize cpu affinity
| | | * Randomize cpu affinityDan Willemsen2017-02-231-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continue to lock kati to one or two CPUs, but pick one CPU at random, and pick another CPU next to it. This dramatically speeds up cases where more than one Kati instance is running at a time. There's a multiproduct_build tool in Android that attempts to run Kati on every build configuration present in the tree. My machine has 48 (including hyperthreading) cpu cores, with 64GB of ram. Before this change, it would take ~12 minutes to build all 59 configurations, 12 at a time. After this change it takes 3 minutes. There doesn't seem to be any significant change in timings for standalone builds. It looks like there was 1-2% difference with my previous change that chose two completely random CPUs, but choosing two that are likely hyperthreaded, or at least on the same chip helps.
| | * | Merge pull request #113 from danw/resilient_findShinichiro Hamaji2017-02-241-3/+20
| | |\ \ | | | | | | | | | | Be more resilient to directories disappearing during startup
| | | * | Be more resilient to directories disappearing during startupDan Willemsen2017-02-231-3/+20
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multiproduct_build, we run a lot of kati instances in the same source tree, but pointing to different out folders. I'm removing the out folders of successful runs so that too much disk space isn't used (unless the user requests it). But I often see a kati PERROR about opendir failing, since it's trying to set up the find emulator while a different configuration's output directory is being removed. This was also hit by #109 in similar circumstances.
| | * | Merge pull request #111 from danw/color_warningsDan Willemsen2017-02-2319-80/+166
| | |\ \ | | | |/ | | |/| Improve and color warnings (with --color_warnings)
| | | * Pass a Loc into FindEmulator for better warningsDan Willemsen2017-02-224-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, we'd only get a warning from FindEmulator, with no idea which makefile caused it: FindEmulator: find: `tests': No such file or directory With this change, we'll get a better idea of which line triggered that problem: cts/tests/tests/content/Android.mk:43: FindEmulator: find: `test': No such file or directory And it will be colorized like any other location-based warning with the previous patch if --color_warnings is turned on.
| | | * Add --color_warnings to make warnings/errors like clangDan Willemsen2017-02-2216-53/+139
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds new (WARN|KATI_WARN|ERROR)_LOC log macro variants that take a location as the first argument, and will prefix that location information to the warning/error lines. When --color_warnings is enabled, it reformats them to have a standard warning:/error: infix, and adds colors in order to match the warnings/errors produced by clang.
| | * Merge pull request #108 from zchee/authors-glogShinichiro Hamaji2016-12-021-1/+1
| | |\ | | | | | | | | nit: [AUTHORS] Fix kati instead of glog
| | | * [AUTHORS] Fix kati instead of glogKoichi Shiraishi2016-12-021-1/+1
| | |/ | | | | | | | | | Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
| | * Merge pull request #106 from zchee/go-gettableShinichiro Hamaji2016-11-299-4/+16
| | |\ | | | | | | | | [go] Fix can't the build kati binary
| | | * Add Koichi Shiraishi to AUTHORS/CONTRIBUTORSKoichi Shiraishi2016-11-292-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
| | | * [C++] add +build ignore magic comment for go buildKoichi Shiraishi2016-11-295-0/+10
| | | | | | | | | | | | | | | | Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
| | | * [go] fix ldflags foramt to add '=' for -X flagKoichi Shiraishi2016-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - go has been changed ldflags parse format. Must be -X key=value. Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
| | | * [go] fix stat.Dev type to uint64Koichi Shiraishi2016-11-291-3/+3
| | |/ | | | | | | | | | Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
| | * Merge pull request #105 from danw/kati_poolShinichiro Hamaji2016-11-064-2/+56
| | |\ | | | | | | | | Allow rules to specify custom ninja pools
| | | * Allow rules to specify custom ninja poolsDan Willemsen2016-11-054-2/+56
| | |/ | | | | | | | | | | | | | | | | | | | | | Setting .KATI_NINJA_POOL as a rule variable will set the corresponding pool variable in the ninja file. There's no way to define custom pools in Kati, Android is planning on scaling the pool depth in a parent ninja file without re-running Kati.
| | * Merge pull request #104 from danw/clang-tidyShinichiro Hamaji2016-11-026-5/+10
| | |\ | | | | | | | | Fix some possible performance issues found by clang-tidy
| | | * Fix some possible performance issues found by clang-tidyDan Willemsen2016-11-016-5/+10
| | |/ | | | | | | | | | | | | No obvious time differences when building AOSP, but these all seem like reasonable changes.
* | | Merge remote-tracking branch 'aosp/upstream' into master am: 7e2a7c776bDan Willemsen2016-10-211-3/+3
|\| | | | | | | | | | | | | | | | | am: dd026a6d01 Change-Id: Ib2a64949e1f735b3c707cbd5781718b34d1e3384
| * | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-211-3/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | am: 7e2a7c776b Change-Id: I4f70289cdfb25d8d42ce0424c0473df8eea5260a
| | * | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-201-3/+3
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aosp/upstream: Update Android.bp to shrink executables Test: mma -j Change-Id: I0b4b8daabee1d91ffdfef1945fb08b47d53a404e
| | | * Merge pull request #103 from google/danw-androidbp-updateShinichiro Hamaji2016-10-211-3/+3
| | | |\ | | | | | | | | | | Update Android.bp to shrink executables
| | | | * Update Android.bp to shrink executablesDan Willemsen2016-10-201-3/+3
| | | |/ | | | | | | | | Keep whole_static_libs for the main executable, but use static_libs for the rest. My goal is to check ckati_stamp_dump into Android as a prebuilt, and it goes from 2.4M->1.2M for the ASAN version, and 352K->11K for the normal version.
* | | | Merge remote-tracking branch 'aosp/upstream' into master am: c4cebd6972Dan Willemsen2016-10-217-46/+180
|\| | | | | | | | | | | | | | | | | | | | | | | am: fa51372f9f Change-Id: Icad68eb2c13880711c1f8f7396b79ede6dad1262
| * | | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-217-46/+180
|/| | | | |/ / | | | | | | | | | | | | am: c4cebd6972 Change-Id: Ie788813f5dcb1196f08db80df90b44efbb73e039
| * | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-207-46/+180
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aosp/upstream: Fix typo in regen_dump.cc Optimize findleaves regen check Remove "out" special case handling from FindEmulator Add a tool to export a kati stamp file to other tools Fix typo in comment. Turn CHECK failure that depends on file system state into an error message and include what failed in the error. Test: Upstream tests pass Change-Id: I00479b65666d3b5fb6dd923f74d39eeea8462d08
| | * Merge pull request #102 from danw/typoDan Willemsen2016-10-201-1/+1
| | |\ | | | | | | | | Fix typo in regen_dump.cc
| | | * Fix typo in regen_dump.ccDan Willemsen2016-10-201-1/+1
| | |/
| | * Merge pull request #101 from danw/findleavesShinichiro Hamaji2016-10-214-24/+92
| | |\ | | | | | | | | Fix a few findleaves issues
| | | * Optimize findleaves regen checkDan Willemsen2016-10-194-20/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we've found all possible files in a leaf directory, we don't need to re-run findleaves every time the leaf directory's timestamp changes, we just need to make sure the file(s) that we found still exist. This saves a few seconds every time an atomic write is done in a source directory next to an Android.mk file. (Atomic writes use renames, so they always change the directory's timestamp) With the last commit that finds out/Android.mk and out/CleanSpec.mk, it turns out that the output directory's timestamp was changing every build, causing the global Android.mk & CleanSpec.mk findleaves.py command to be executed every regen check. TEST_FIND_EMULATOR still passes after this change.
| | | * Remove "out" special case handling from FindEmulatorDan Willemsen2016-10-191-4/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We removed the special casing of $OUT_DIR from our findleaves commands to fix problems where $OUT_DIR was named the same as a real directory. But now TEST_FIND_EMULATOR (and regen) is broken, since the real command finds out/Android.mk, but the emulated version does not. Since we're already traversing output directories that aren't called "out", just remove the "out" special casing from the find emulator. This raises the time to init the find emulator from 0.85s to 1.12s on my machine with one product built. But this only happens when you're about to read all of the makefiles anyways, not during regen. The node count goes from 683196 to 894396.
| | * Merge pull request #100 from danw/stamp_dump_toolShinichiro Hamaji2016-10-182-20/+84
| | |\ | | | | | | | | Add a tool to export a kati stamp file to other tools
| | | * Add a tool to export a kati stamp file to other toolsDan Willemsen2016-10-172-20/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a desire to understand which files are used by a build so that the automated builds can make better guesses at which builds should be run for a certain change. Instead of having them read a stamp file directly, which would prevent us from updating the stamp format in the future, build a tool that can be used to export the contents in a stable and more portable format. Right now, this just means exporting the file list to stdout with newlines as delimiters. An idea for the future is to define a protobuf or similar format that would contain the glob and shell information as well (if it's useful).
| | * | Merge pull request #87 from nlewycky/masterDan Willemsen2016-10-171-2/+4
| | |\ \ | | | |/ | | |/| Include details in error message
| | | * Fix typo in comment.Nick Lewycky2016-06-221-1/+1
| | | |
| | | * Turn CHECK failure that depends on file system state into an error messageNick Lewycky2016-06-221-1/+3
| | | | | | | | | | | | | | | | and include what failed in the error.
* | | | Merge remote-tracking branch 'aosp/upstream' into master am: 1b68243cf2 am: ↵Dan Willemsen2016-10-0523-67/+709
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f80f337f16 am: 1f45e0859e Change-Id: I23815513d619124aca677d36edf16d2e22730297
| * \ \ \ Merge remote-tracking branch 'aosp/upstream' into master am: 1b68243cf2Dan Willemsen2016-10-0523-67/+709
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: f80f337f16 Change-Id: Iebfa9275bcc902841b2414ecc88b56b2bb959e19
| | * | | | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-0523-67/+709
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 1b68243cf2 Change-Id: I4d96ed0b16c5e92b0d5dde19f098560dc0c81b75
| | | * | | Merge remote-tracking branch 'aosp/upstream' into masterDan Willemsen2016-10-0423-67/+709
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aosp/upstream: Implement the `file` function to read and write files Run regen commands sequentially Optimize RunCommand by removing /bin/sh wrapper when possible Add simple benchmark for RunCommand Support marking variables as readonly Bug: 30947985 Test: Passes upstream kati test suite, manual android testing