Commit Diff


commit - 00eb6a1fb9f2f7f11d18494a994d3594d5f495ef
commit + 37c06ea4bc43854ab1212229878ceceb14a26167
blob - a11f5adfc60eb76b1bde6823af16c5920318e355
blob + d6f07ad42866822ab016b66c8849e83d895762a6
--- got/Makefile
+++ got/Makefile
@@ -10,7 +10,12 @@ SRCS=		got.c blame.c commit_graph.c delta.c diff.c dif
 
 CPPFLAGS = -I${.CURDIR}/../include -I${.CURDIR}/../lib \
 	-DGOT_LIBEXECDIR=${GOT_LIBEXECDIR}
+
+.if defined(PROFILE)
+LDADD = -lutil_p -lz_p -lc_p
+.else
 LDADD = -lutil -lz
+.endif
 DPADD = ${LIBZ} ${LIBUTIL}
 
 # For now, default to installing binary in ~/bin
blob - fd5ec92214d046dc4a4003c9345566aed8a9258c
blob + faa0693fcb3ae7d587e6a155851517362225d162
--- got/got.c
+++ got/got.c
@@ -244,6 +244,10 @@ apply_unveil(const char *repo_path, int repo_read_only
 {
 	const struct got_error *err;
 
+#ifdef PROFILE
+	if (unveil("gmon.out", "rwc") != 0)
+		return got_error_from_errno2("unveil", "gmon.out");
+#endif
 	if (create_worktree) {
 		/* Pre-create work tree path to avoid unveiling its parents. */
 		err = got_path_mkdir(worktree_path);
blob - fd1c06e2651c8686a8625fc0a6481cacc3b251ce
blob + f627a28b1c50d53dd1d59a09615761eacf77ba3e
--- tog/Makefile
+++ tog/Makefile
@@ -10,7 +10,11 @@ SRCS=		tog.c blame.c commit_graph.c delta.c diff.c dif
 
 CPPFLAGS = -I${.CURDIR}/../include -I${.CURDIR}/../lib \
 	-DGOT_LIBEXECDIR=${GOT_LIBEXECDIR}
+.if defined(PROFILE)
+LDADD = -lpanel_p -lncursesw_p -lutil_p -lz_p -lpthread_p -lc_p
+.else
 LDADD = -lpanel -lncursesw -lutil -lz -lpthread
+.endif
 DPADD = ${LIBZ} ${LIBUTIL}
 
 # For now, default to installing binary in ~/bin
blob - ab73a28c8793e2580177009a1a28e5e4f4187c4c
blob + 8801ee6c890f7fea8d134551d25cfa15ef92fcab
--- tog/tog.c
+++ tog/tog.c
@@ -2109,6 +2109,10 @@ apply_unveil(const char *repo_path, const char *worktr
 {
 	const struct got_error *error;
 
+#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);