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
This commit is contained in:
Konstantin Belousov 2021-04-01 04:16:32 +03:00
parent aa3ea612be
commit 69efe3695d
7 changed files with 1 additions and 47 deletions

View File

@ -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.

View File

@ -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

View File

@ -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;

View File

@ -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 {

View File

@ -79,7 +79,6 @@ struct kt {
{ "nomakeoption", NOMAKEOPTION },
{ "nomakeoptions", NOMAKEOPTION },
{ "maxusers", MAXUSERS },
{ "profile", PROFILE },
{ "option", OPTIONS },
{ "options", OPTIONS },
{ "nooption", NOOPTION },

View File

@ -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));

View File

@ -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);