summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.85
-rw-r--r--usr.sbin/config/mkmakefile.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8
index 5f93a86..32cb360 100644
--- a/usr.sbin/config/config.8
+++ b/usr.sbin/config/config.8
@@ -88,6 +88,11 @@ will configure a system for profiling; for example,
.Xr kgmon 8
and
.Xr gprof 1 .
+If two or more
+.Fl p
+options are supplied,
+.Nm config
+will configure a system for high resolution profiling.
.It Fl n
If the
.Fl n
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index 8f6ca3a..f8e01d0 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -157,8 +157,10 @@ makefile()
}
fprintf(ofp, "KERN_IDENT=%s\n", raise(ident));
fprintf(ofp, "IDENT=");
- if (profiling)
+ if (profiling >= 1)
fprintf(ofp, " -DGPROF");
+ if (profiling >= 2)
+ fprintf(ofp, " -DGPROF4 -DGUPROF");
if (cputype == 0) {
printf("cpu type must be specified\n");
@@ -202,8 +204,10 @@ makefile()
fprintf(ofp, "%s=%s\n", op->op_name, op->op_value);
if (debugging)
fprintf(ofp, "DEBUG=-g\n");
- if (profiling)
+ if (profiling >= 1)
fprintf(ofp, "PROF=-pg\n");
+ if (profiling >= 2)
+ fprintf(ofp, "PROF+=-mprofiler-epilogue\n");
while (fgets(line, BUFSIZ, ifp) != 0) {
if (*line != '%') {
fprintf(ofp, "%s", line);
OpenPOWER on IntegriCloud