From 69efe3695d75d716e6066a0b1225df00ec98952b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Thu, 1 Apr 2021 04:16:32 +0300 Subject: [PATCH] config(8): remove support for -p and other equivalent ways to request mcount-based profiling, like 'profile N' in kernel config. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D29529 --- usr.sbin/config/config.5 | 14 -------------- usr.sbin/config/config.8 | 10 ---------- usr.sbin/config/config.h | 2 -- usr.sbin/config/config.y | 2 -- usr.sbin/config/lang.l | 1 - usr.sbin/config/main.c | 4 ---- usr.sbin/config/mkmakefile.c | 15 +-------------- 7 files changed, 1 insertion(+), 47 deletions(-) diff --git a/usr.sbin/config/config.5 b/usr.sbin/config/config.5 index 9b26326ea862..dd3ee8baffee 100644 --- a/usr.sbin/config/config.5 +++ b/usr.sbin/config/config.5 @@ -401,20 +401,6 @@ Options specific to architecture .Ar arch are specified in the file .Pa sys/conf/options . Ns Aq Ar arch . -.\" -------- PROFILE -------- -.Pp -.It Ic profile Ar number -Enables kernel profiling if -.Ar number -is non-zero. -If -.Ar number -is 2 or greater, the kernel is configured for -high-resolution profiling. -Kernels can also be built for profiling using the -.Fl p -option to -.Xr config 8 . .El .Ss Obsolete Directives The following kernel configuration directives are obsolete. diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8 index c8c92b5eddab..b33c972c8efa 100644 --- a/usr.sbin/config/config.8 +++ b/usr.sbin/config/config.8 @@ -102,16 +102,6 @@ file. This option makes sense only if .Cd "options INCLUDE_CONFIG_FILE" entry was present in your configuration file. -.It Fl p -Configure a system for profiling; for example, -.Xr kgmon 8 -and -.Xr gprof 1 . -If two or more -.Fl p -options are supplied, -.Nm -configures a system for high resolution profiling. .It Ar SYSTEM_NAME Specify the name of the system configuration file containing device specifications, configuration options diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index a1591486b390..79d0a788bae7 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -69,7 +69,6 @@ struct files_name { * Types. */ #define NORMAL 1 -#define PROFILING 3 #define NODEPEND 4 #define LOCAL 5 #define DEVDONE 0x80000000 @@ -210,7 +209,6 @@ extern STAILQ_HEAD(file_list_head, file_list) ftab; extern STAILQ_HEAD(files_name_head, files_name) fntab; -extern int profiling; extern int debugging; extern int found_defaults; diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 6fcd93aa19f9..3d517c2b789e 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -18,7 +18,6 @@ %token HINTS %token IDENT %token MAXUSERS -%token PROFILE %token OPTIONS %token NOOPTION %token MAKEOPTIONS @@ -192,7 +191,6 @@ Config_spec: System_spec | MAXUSERS NUMBER { maxusers = $2; } | - PROFILE NUMBER { profiling = $2; } | ENV ID { newenvvar($2, true); } | ENVVAR ENVLINE { newenvvar($2, false); } | HINTS ID { diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 308c38393916..f83af3b5d9cc 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -79,7 +79,6 @@ struct kt { { "nomakeoption", NOMAKEOPTION }, { "nomakeoptions", NOMAKEOPTION }, { "maxusers", MAXUSERS }, - { "profile", PROFILE }, { "option", OPTIONS }, { "options", OPTIONS }, { "nooption", NOOPTION }, diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index e52db432bf65..60bafb0b46ba 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -88,7 +88,6 @@ char destdir[MAXPATHLEN]; char srcdir[MAXPATHLEN]; int debugging; -int profiling; int found_defaults; int incignore; @@ -170,9 +169,6 @@ main(int argc, char **argv) case 'm': printmachine = 1; break; - case 'p': - profiling++; - break; case 's': if (*srcdir == '\0') strlcpy(srcdir, optarg, sizeof(srcdir)); diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 0a1f2f129aab..00eb3422d1d0 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -155,8 +155,6 @@ makefile(void) } if (debugging) fprintf(ofp, "DEBUG=-g\n"); - if (profiling) - fprintf(ofp, "PROFLEVEL=%d\n", profiling); if (*srcdir != '\0') fprintf(ofp,"S=%s\n", srcdir); while (fgets(line, BUFSIZ, ifp) != NULL) { @@ -406,7 +404,7 @@ read_file(char *fname) /* * include "filename" * filename [ standard | optional ] - * [ dev* [ | dev* ... ] | profiling-routine ] [ no-obj ] + * [ dev* [ | dev* ... ] | [ no-obj ] * [ compile-with "compile rule" [no-implicit-rule] ] * [ dependency "dependency-list"] [ before-depend ] * [ clean "file-list"] [ warning "text warning" ] @@ -554,10 +552,6 @@ read_file(char *fname) continue; } nreqs++; - if (eq(wd, "profiling-routine")) { - filetype = PROFILING; - continue; - } if (std) errout("standard entry %s has optional inclusion specifier %s!\n", this, wd); @@ -585,8 +579,6 @@ nextparam:; if (std == 0 && nreqs == 0) errout("%s: what is %s optional on?\n", fname, this); - if (filetype == PROFILING && profiling == 0) - goto next; tp = new_fent(); tp->f_fn = this; tp->f_type = filetype; @@ -789,11 +781,6 @@ do_rules(FILE *f) case NORMAL: ftype = "NORMAL"; break; - case PROFILING: - if (!profiling) - continue; - ftype = "PROFILE"; - break; default: fprintf(stderr, "config: don't know rules for %s\n", np);