aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2016-06-02 21:46:40 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-06-03 12:53:50 +0000
commita50b7b710b423af2ac00f3cf4e238449efbf48c7 (patch)
treea4fa25a65c5e15000455d2ad6cfda44fd05d5ae5 /src
parentf65ed85c7123d1f5d0127fcb4f33cfa3d01ef3e1 (diff)
Don't create CommandCompleteEvent for OOMs ahead of time. Its super-constructor records timestamps and gc stats under the covers, so that data will be inaccurate.
-- MOS_MIGRATED_REVID=123909692
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
index 8cb02632c2..3a51bb717c 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
@@ -141,10 +141,6 @@ public final class BlazeRuntime {
private static final Logger LOG = Logger.getLogger(BlazeRuntime.class.getName());
- // Pre-allocate memory for this object in case of an OOM.
- private static final CommandCompleteEvent OOM_COMMAND_COMPLETE_EVENT =
- new CommandCompleteEvent(ExitCode.OOM_ERROR.getNumericExitCode());
-
private final Iterable<BlazeModule> blazeModules;
private final Map<String, BlazeCommand> commandMap = new LinkedHashMap<>();
private final Clock clock;
@@ -519,11 +515,7 @@ public final class BlazeRuntime {
// thread won the race (unlikely, but possible), this may be incorrectly logged as a success.
return;
}
- CommandCompleteEvent commandCompleteEvent =
- exitCode == ExitCode.OOM_ERROR.getNumericExitCode()
- ? OOM_COMMAND_COMPLETE_EVENT
- : new CommandCompleteEvent(exitCode);
- workspace.getSkyframeExecutor().getEventBus().post(commandCompleteEvent);
+ workspace.getSkyframeExecutor().getEventBus().post(new CommandCompleteEvent(exitCode));
}
/**