[master] 2f8e7967f Try to force GCOV out another way before we call abort()

Poul-Henning Kamp phk at FreeBSD.org
Tue Jun 9 22:13:12 UTC 2020


commit 2f8e7967f454bd694c7eafebbc548fc89db72357
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Jun 9 22:12:09 2020 +0000

    Try to force GCOV out another way before we call abort()

diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index bfee6a1ad..2623fa422 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -64,7 +64,7 @@
  */
 
 #ifdef GCOVING
-    int __llvm_profile_write_file(void);
+    int __llvm_gcov_flush(void);
 #endif
 
 static struct vsb pan_vsb_storage, *pan_vsb;
@@ -816,7 +816,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
 	VSB_putc(pan_vsb, '\0');	/* NUL termination */
 
 #ifdef GCOVING
-	__llvm_profile_write_file();
+	__llvm_gcov_flush();
 #endif
 	abort();
 }
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index e5aeffdef..678c43f9e 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -64,7 +64,7 @@ static const struct cli_cmd_desc *cmds[] = {
 };
 
 #ifdef GCOVING
-    int __llvm_profile_write_file(void);
+    int __llvm_gcov_flush(void);
 #endif
 
 static const int ncmds = sizeof cmds / sizeof cmds[0];
@@ -113,7 +113,7 @@ mcf_panic(struct cli *cli, const char * const *av, void *priv)
 	(void)av;
 	(void)priv;
 #ifdef GCOVING
-	__llvm_profile_write_file();
+	__llvm_gcov_flush();
 #endif
 	AZ(strcmp("", "You asked for it"));
 	/* NOTREACHED */


More information about the varnish-commit mailing list