"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
profiling gotweb
To:
gameoftrees@openbsd.org
Date:
Thu, 17 Jun 2021 17:59:55 +0200

Download raw body.

Thread
  • Stefan Sperling:

    profiling gotweb

Profiled gotweb doesn't create gmon.out because the file isn't unveiled.

ok?

diff 9ec58fff16b1c2fc1d33d9955b42cadaa9e26f29 /home/stsp/src/got
blob - 3a689cd14ad0dacbec839cd0d7dead37f4d5f83c
file + gotweb/gotweb.c
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -308,6 +308,10 @@ gw_apply_unveil(const char *repo_path)
 {
 	const struct got_error *err;
 
+#ifdef PROFILE
+	if (unveil("gmon.out", "rwc") != 0)
+		return got_error_from_errno2("unveil", "gmon.out");
+#endif
 	if (repo_path && unveil(repo_path, "r") != 0)
 		return got_error_from_errno2("unveil", repo_path);