Backed out changeset 68ed52f7e45d (bug 1899241) for causing sccache misses (bug 19048...
[gecko.git] / build / build-clang / Remove-FlushViewOfFile-when-unmaping-gcda-files.patch
bloba3ea2d75f9e652dc864c1beef222aca7db0d2f37
1 From 78a6bcfed4b73f13b9973afd69b76067dd4a5dde Mon Sep 17 00:00:00 2001
2 From: Calixte Denizet <calixte.denizet@gmail.com>
3 Date: Mon, 4 Oct 2021 11:07:56 +0200
4 Subject: [PATCH] Remove FlushViewOfFile when unmaping gcda files - it can
5 causes bad performances with slow disks; - MS docs say that it's mainly
6 useful in case of hard failures (OS crash, electrical failure, ...): so it's
7 useless to call this function when ccov builds run on CI.
9 ---
10 compiler-rt/lib/profile/GCDAProfiling.c | 5 -----
11 1 file changed, 5 deletions(-)
13 diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
14 index 4293e8f7b5bf..83650d33c95d 100644
15 --- a/compiler-rt/lib/profile/GCDAProfiling.c
16 +++ b/compiler-rt/lib/profile/GCDAProfiling.c
17 @@ -286,11 +286,6 @@ static int map_file() {
19 static void unmap_file() {
20 #if defined(_WIN32)
21 - if (!FlushViewOfFile(write_buffer, file_size)) {
22 - fprintf(stderr, "profiling: %s: cannot flush mapped view: %lu\n", filename,
23 - GetLastError());
24 - }
26 if (!UnmapViewOfFile(write_buffer)) {
27 fprintf(stderr, "profiling: %s: cannot unmap mapped view: %lu\n", filename,
28 GetLastError());
29 --
30 2.33.0