aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime
Commit message (Collapse)AuthorAge
* Remove gender specific prononuns from Bazel codebaseGravatar hlopko2018-07-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 205635805
* Close the query environment after running a query.Gravatar shreyax2018-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 205447838
* Add aquery as proper command to Bazel.Gravatar twerth2018-07-18
| | | | | RELNOTES: Add aquery command to get analysis time information about the action graph. PiperOrigin-RevId: 205064145
* Remove bazel info crosstool-configurationGravatar hlopko2018-07-13
| | | | | | | It was not opensourced, and even internally was not used. And we hate having internal-only code. RELNOTES: None. PiperOrigin-RevId: 204441702
* Omit parts of BEP events (like stdout, stderr) when the associated artifact ↵Gravatar tomlu2018-07-11
| | | | | | | uploader cannot upload a particular file. RELNOTES: None PiperOrigin-RevId: 204167372
* bep: introduce BuildEventArtifactUploaderFactoryGravatar buchgr2018-07-09
| | | | | | | | | | | | | | | | There can be multiple BuildEventTransports active at the same time and we need to ensure that each transport gets its own BuildEventArtifactUploader as these transports might have different lifecycles. We do that by introducing another level of indirection via the BuildEventArtifactUploaderFactory. BlazeModules now register a factory object instead of an uploader. In addition, the BuildEventArtifactUploader gets a shutdown() method that allows to free any resources associated with it. PiperOrigin-RevId: 203752092
* Replace instances of Blaze with Bazel.Gravatar Dan Fabulich2018-07-05
| | | | | | | PiperOrigin-RevId: 203300374 Change-Id: Iaa47f870ab2e0cad40a202aad2c7f9430f73c856 PiperOrigin-RevId: 203407392
* Include more information about build events' referenced local files.Gravatar tomlu2018-07-04
| | | | | | | Instead of just a path, events now include information about the type of file (output, source file, stdout/stderr, test logs, etc.). This information can be used by the uploaders to determine a) whether to upload, b) what kind of lease to give the files. RELNOTES: None PiperOrigin-RevId: 203285549
* Remove --allow_undefined_configsGravatar ccalvarin2018-06-28
| | | | | RELNOTES: --[no]allow_undefined_configs no longer exists, passing undefined configs is an error. PiperOrigin-RevId: 202518987
* Move HashFunction out of FileSystem, and turn it into a class, instead of an ↵Gravatar ccalvarin2018-06-21
| | | | | | | | | enum. Now that we aren't using enum names for the hash functions, we also accept the standard names, such as SHA-256. RELNOTES: None. PiperOrigin-RevId: 201624286
* Remove deprecated flag "skylark_incremental_res" from mobile-install command.Gravatar Googler2018-06-21
| | | | | | | RELNOTES[INC]: The mobile-install --skylark_incremental_res flag is no longer available, use the --skylark flag instead. PiperOrigin-RevId: 201574876
* Move the profiler setup earlier in the startup.Gravatar twerth2018-06-20
| | | | | | | | | | This gives us more coverage for command startup, especially wrt. modules. We have some modules that are known to be slow, and this immediately shows any such issues. I've already tracked down two issues with this change, and it would also have shown a recently fixed regression. RELNOTES: None. PiperOrigin-RevId: 201337059
* Remove support for --discard_actions_after_execution.Gravatar tomlu2018-06-18
| | | | | | | The memory savings from this flag are not worth the complexity, and it interferes with action restarting. RELNOTES: Remove support for --discard_actions_after_execution. PiperOrigin-RevId: 201077905
* Refactoring: uses OutputService for ActionFileSystem injectionGravatar shahan2018-06-18
| | | | | | Moves more Action-oriented from skyframe package, which has become very unwieldy, to action package. This is needed to avoid circular dependencies caused when build-base is needed for skyframe. PiperOrigin-RevId: 200996982
* Add a bit more profiler coverageGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | The intent is that the main thread has ~zero gaps in the profile (though there may still be small gaps due to the time between one try block and an immediately subsequent try block). We need to be careful not to wrap markPhase calls (or methods that call markPhase) in try blocks for the profiler - the Profiler requires that all markPhase calls happen at top level, and throws an exception if not. This should not have any performance impact - all of these are once per build, or at most once per module per build, and we don't expect a very large number of modules (and if we see an increasing number, we need to change the module API to not have to call every single module, but only those that are actually interested in certain events, maybe with an EventBus-based setup). PiperOrigin-RevId: 200712677
* Move the BlazeRuntime.initProfiler call to BlazeCommandDispatcherGravatar ulfjack2018-06-15
| | | | | | | | | | The intend is to move the profiler setup earlier in the startup sequence, so we can get more profiler coverage. Ideally, we'd setup the profiler immediately after getting the client call, but this is not currently possible due to the requirement that initialization and shutdown happen in pairs (otherwise the next command invocation crashes with an exception from the Profiler). PiperOrigin-RevId: 200707029
* Remove the removeHandler/releaseHandler pairsGravatar ulfjack2018-06-15
| | | | | | | | | | | | | | | | | | | | | | | They weren't actually doing anything. With default flags, createHandler never returns a FancyTerminalEventHandler, because that always gets wrapped in a RateLimitingEventHandler. Even so, under normal circumstances, the fancy terminal event handler always leaves the terminal in a valid state at the end of each printed line. We can only end up in a bad state if the blaze server is killed, but even then, this code wasn't doing anything because it didn't get to run. The only way to guarantee that the terminal is always in a valid state is to make sure that every stdout/stderr buffer we send to the client ends with a reset code sequence. The experimental ui handler is better at sending only complete buffers (we were previously using an auto-line flushing output stream, which didn't allow the event handler to reason about how much stuff got actually printed in a single write call). Anyway, I think we're in a better place now, and this code wasn't run, and if we want to fix it properly (if the switch to experimental_ui isn't sufficient), then we need to fix it elsewhere. PiperOrigin-RevId: 200699609
* Refactor BlazeRuntime.initProfilerGravatar ulfjack2018-06-15
| | | | | | | - reduce the parameters to the minimum required - change to void, move additional setup into the method PiperOrigin-RevId: 200692559
* Add a mechanism for build event protocol events to upload filesGravatar ulfjack2018-06-15
| | | | | | | | This should be a no-op, mostly replacing PathConverter with BuildEventArtifactUploader, since none of the implementations perform any upload yet. PiperOrigin-RevId: 200685325
* Remove fixed point config expansion.Gravatar ccalvarin2018-06-14
| | | | | | | Deprecates the flag, though it continues to exist as a no-op so that users get a warning before errors. RELNOTES: --noexpand_configs_in_place is deprecated. PiperOrigin-RevId: 200572053
* Remove unnecessary flags from RunCommand command annotationGravatar ulfjack2018-06-14
| | | | | | | These are no longer necessary since we don't pipe the subprocess stdout/stderr through Bazel anymore. PiperOrigin-RevId: 200534552
* Fix Profiler setup to actually enable the Json formatGravatar ulfjack2018-06-14
| | | | PiperOrigin-RevId: 200518973
* Simplify CommandEnvironment constructor, make fields finalGravatar ulfjack2018-06-14
| | | | PiperOrigin-RevId: 200516863
* Add --experimental_supports_info_crosstool_configuration to support removal ↵Gravatar hlopko2018-06-13
| | | | | | | of bazel info crosstool-configuration RELNOTES: None. PiperOrigin-RevId: 200437121
* Move BuildView.Options to a new top-level classGravatar ulfjack2018-06-13
| | | | | | | This is in preparation for dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner. PiperOrigin-RevId: 200391088
* Remove BlazeModule.checkEnvironmentGravatar ulfjack2018-06-13
| | | | | | Do the work in beforeCommand instead. PiperOrigin-RevId: 200391086
* Add --print_workspace_in_output_paths_if_needed flag.Gravatar mstaib2018-06-12
| | | | | | | | | | | | | | | | When this flag is turned on, and the user's working directory is beneath the workspace (but is not the workspace itself), the workspace's absolute path is printed as a prefix to the convenience symlink. With this flag off, the displayed convenience symlink path is always relative to the user's workspace, even if that isn't the current working directory. (This is the current behavior.) The new (flag-on) behavior will become default soon, and then this flag will be removed. RELNOTES: None. PiperOrigin-RevId: 200278355
* Add support for the Json trace file formatGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | Add a --experimental_generate_json_trace_profile option that puts a file into the output base (or uses --profile if set). There are still a lot of problems with this. - unexplained holes - way too many threads - nonsensical event titles - too many detail events, too little overview - it may also cause unnecessary load - it silently overwrites the existing file on subsequent invocations The format is documented here: goo.gl/oMZPLh PiperOrigin-RevId: 200259431
* Refactor profilerGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | - move the save method to an inner class - don't use a timer, use a blocking queue instead - add a format enum (in anticipation of adding a json output format) - update the test to use an in memory buffer, and avoid FoundationTestCase Compared to the original https://github.com/bazelbuild/bazel/commit/15b8c259db111012b4642287172cb4d1d82151f3, it contains these changes: - Make it so we don't create a queue if we are not going to write any data! The queue is now owned by the writer, and if there is no writer, there is no queue. This was causing a memory regression because slowest task profiling is enabled by default, in which case the profiler is started with no output file. In that case, there's no thread that is emptying the queue, but the queue was still created by default. - add additional tests for slowest task and histogram handling; these also provide coverage for the case where the profiler is started without an output stream - move all the writer thread handling into the inner class - make writer access thread-safe - add a bunch of documentation PiperOrigin-RevId: 200212978
* Split TargetPatternEvaluator into two interfacesGravatar ulfjack2018-06-12
| | | | | | | | | | | | | | | | | - the TargetPatternPreloader is still used for query in all its forms - the remaining TargetPatternEvaluator part is no longer used except in tests - also make both implementations stateless and pass the offset to the methods instead; note that they both modify the underlying skyframe graph, so there are side effects to the calls even if there's no direct state anymore The intent is to migrate the relevant tests to LoadingPhaseRunnerTest (which could also now be renamed since it's not doing a loading phase), and then delete the TargetPatternEvaluator interface. This depends on the previous commit that removed the last direct use of TPE from an internal command. PiperOrigin-RevId: 200198067
* Automated rollback of commit 15b8c259db111012b4642287172cb4d1d82151f3.Gravatar jmmv2018-06-11
| | | | | | | | *** Reason for rollback *** Breaks internal performance tests. PiperOrigin-RevId: 200103033
* Refactor profilerGravatar ulfjack2018-06-11
| | | | | | | | | - move the save method to an inner class - don't use a timer, use a blocking queue instead - add a format enum (in anticipation of adding a json output format) - update the test to use an in memory buffer, and avoid FoundationTestCase PiperOrigin-RevId: 200065404
* Add AutoProfiler-like API to ProfilerGravatar ulfjack2018-06-11
| | | | | | - migrate all startTask/completeTask pairs to the new API PiperOrigin-RevId: 200038703
* Clean up Profiler a bitGravatar ulfjack2018-06-08
| | | | PiperOrigin-RevId: 199849102
* BlazeOptionHandler: only check in the parent directory, if there is oneGravatar Klaus Aehlig2018-06-08
| | | | | | | | | | | When checking for a file called DO_NOT_BUILD_HERE in the parent direcotry of the workspace path, first verify that there is such a parent directory. This avoids a null pointer exception if the WORKSPACE file is in the top-level directory. Fixes #5349 Change-Id: I81289a27a3f7fb0f4b5a112343de1b454fb5b8c5 PiperOrigin-RevId: 199790735
* Filter middleman artifacts from NamedArtifactGroupGravatar ulfjack2018-06-08
| | | | PiperOrigin-RevId: 199786555
* Rewrite TargetPattern failure reportingGravatar ulfjack2018-06-07
| | | | | | | | | | | | | | Report failures in TargetPatternFunction, rather than in its callers. Since we can't distinguish between keep_going and nokeep_going modes, we otherwise end up double-reporting errors. In the particular case that's covered by the build_event_stream_test.sh, we end up reporting the same target pattern as both skipped and failed. Unfortunately, this means we cannot report whether the target pattern was skipped or failed, so the pattern_skipped event is now unused (if we agree that this is acceptable, I'll remove the corresponding infrastructure). PiperOrigin-RevId: 199593700
* Mark --batch as deprecated in the documentation.Gravatar ccalvarin2018-06-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 199503117
* Clean up `bazel help coverage`Gravatar Googler2018-06-05
| | | | | | | Remove blaze references and add a missing "a". RELNOTES: None. PiperOrigin-RevId: 199300497
* Refactor root cause reporting in ConfiguredTargetFunctionGravatar ulfjack2018-05-29
| | | | | | We now track Causes instead of plain Labels, which will allow us to do better reporting in the future. Add basic tests. PiperOrigin-RevId: 198380468
* Remove special casing from processes stat line.Gravatar Googler2018-05-25
| | | | | | | | Fixes #5263 RELNOTES: execution strategies line no longer handles differently the case where all processes have the same strategy. PiperOrigin-RevId: 198057496
* Refactor analysis failure reporting, report loading failuresGravatar ulfjack2018-05-24
| | | | | | | | Split the AnalysisFailureEvent into a legacy and a new variant; always post an AnalysisFailureEvent, even if the legacy variant is not posted - this gives us some coverage for loading failures. PiperOrigin-RevId: 197862257
* Get ConfiguredTargetAndData out of TargetCompleteEvent.Gravatar janakr2018-05-22
| | | | | | Having it in there makes serializing events harder. PiperOrigin-RevId: 197648233
* Changing SymlinkTreeStrategy not to use spawns.Gravatar Googler2018-05-18
| | | | | RELNOTES: An internal action for symlinking runfiles will use Command instead of a Spawns. This should have no functional chages; the only user visible consequence should be that the internal action is no longer be included in statistics when calculating processes count. PiperOrigin-RevId: 197131917
* Remove the "--as_test" command line option to "bazel run".Gravatar lberki2018-05-18
| | | | | | RELNOTES[INC]: "bazel run --noas_test" is not supported anymore. PiperOrigin-RevId: 197126838
* Remove "bazel run --nodirect_run".Gravatar lberki2018-05-18
| | | | | | | RELNOTES[INC]: Bazel now always runs binaries in with "bazel run" in interactive mode. The "--nodirect_run" command line option is now a no-op. PiperOrigin-RevId: 197121535
* Rename BuildEventConverters to BuildEventContextGravatar ulfjack2018-05-17
| | | | | | | This is in preparation for adding options to the class, which can be used to modify the behavior of build events posted to the BEP. PiperOrigin-RevId: 196997573
* Remove AbruptException(ExitCode exitCode) constructor.Gravatar lpino2018-05-17
| | | | | | | | | This constructor was creating an Exception with a null message leading to possible NullPointerExceptions in a few places in our codebase. The call sites have been replaced with calls to AbruptException(String message, ExitCode exitCode) with a meaningful message. PiperOrigin-RevId: 196973540
* Fix embedded JDK LICENSE handling for JDK 9Gravatar cushon2018-05-16
| | | | PiperOrigin-RevId: 196840344
* Port bazelrc flags into their own module.Gravatar ccalvarin2018-05-16
| | | | | | | | | This way the documentation logs them correctly as named "bazel," and describes the correct behavior. Needed for #4502. RELNOTES: None. PiperOrigin-RevId: 196837021