Revert "[coverage] Remove Clang coverage dump at fast exit."
This reverts commit 935afaa804
.
Reason for revert: Per Wez's comments, this change doesn't do what we expect.
Original change's description:
> [coverage] Remove Clang coverage dump at fast exit.
>
> The coverage dump in TerminateCurrentProcessImmediately is currently
> blocking us from gathering coverage for sandboxed processes, because
> it corrupts the data from those processes.
>
> This is a temporary workaround, until we implement a proper solution
> for the data corruption.
>
> Bug: 993537
> Change-Id: Idd4669f3d41b349247161e9611e52ca00a9e75ac
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752926
> Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
> Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#686667}
TBR=wez@chromium.org,nodir@chromium.org,liaoyuke@chromium.org,sajjadm@chromium.org
Change-Id: I454f38a7a708e6b7cff36f0603d03e96332d37ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 993537
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753549
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686825}
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "base/clang_coverage_buildflags.h"
|
||||
#include "base/debug/activity_tracker.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
#include "base/logging.h"
|
||||
@ -22,6 +23,9 @@
|
||||
#include <sys/event.h>
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(CLANG_COVERAGE)
|
||||
#include "base/test/clang_coverage.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
@ -272,6 +276,9 @@ bool Process::CanBackgroundProcesses() {
|
||||
|
||||
// static
|
||||
void Process::TerminateCurrentProcessImmediately(int exit_code) {
|
||||
#if BUILDFLAG(CLANG_COVERAGE)
|
||||
WriteClangCoverageProfile();
|
||||
#endif
|
||||
_exit(exit_code);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user