From: Tracey Emery Subject: Re: profiling gotweb To: gameoftrees@openbsd.org Date: Thu, 17 Jun 2021 10:04:18 -0600 On Thu, Jun 17, 2021 at 05:59:55PM +0200, Stefan Sperling wrote: > 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); > ok -- Tracey Emery