kern/119358: SYSINIT_VERBOSE can be more verbose
Dan Lukes
dan at obluda.cz
Sat Jan 5 05:30:01 PST 2008
>Number: 119358
>Category: kern
>Synopsis: SYSINIT_VERBOSE can be more verbose
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 05 13:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Dan Lukes
>Release: FreeBSD 6.3-PRERELEASE i386
>Organization:
Obludarium
>Environment:
System: FreeBSD kulesh.obluda.cz 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #14: Sat Jan 5 10:46:19 CET 2008 dan at kulesh.obluda.cz:/usr/obj/usr/src/sys/KULESH i386
but it apply to RELENG_7 and HEAD as well
>Description:
the SYSINIT_VERBOSE will push the mi_startup() to display
the progress of system startup
Due current implementation logic, the SI_SUB_COPYRIGHT level message
are not displayed althought it can be.
Also, not only functions but it's parameters also can be DDB-resolved
to names if DDB present.
>How-To-Repeat:
>Fix:
SI_SUB_COPYRIGHT messages will be displayed if 'last' variable will be
initialized to SI_SUB_COPYRIGHT-1 (now it's initialized to SI_SUB_COPYRIGHT)
Other changes resolve the function parameter to name.
--- sys/kern/init_main.c.ORIG 2008-01-05 12:44:57.000000000 +0100
+++ sys/kern/init_main.c 2008-01-05 13:01:42.000000000 +0100
@@ -200,7 +200,7 @@
}
#if defined(VERBOSE_SYSINIT)
- last = SI_SUB_COPYRIGHT;
+ last = SI_SUB_COPYRIGHT-1;
verbose = 0;
#if !defined(DDB)
printf("VERBOSE_SYSINIT: DDB not enabled, symbol lookups disabled.\n");
@@ -231,18 +231,31 @@
if (verbose) {
#if defined(DDB)
const char *name;
+ const char *pname;
c_db_sym_t sym;
db_expr_t offset;
sym = db_search_symbol((vm_offset_t)(*sipp)->func,
DB_STGY_PROC, &offset);
db_symbol_values(sym, &name, NULL);
+ sym = db_search_symbol((vm_offset_t)(*sipp)->udata,
+ DB_STGY_ANY, &offset);
+ if (offset == 0)
+ db_symbol_values(sym, &pname, NULL);
+ else
+ pname=NULL;
+
if (name != NULL)
- printf(" %s(%p)... ", name, (*sipp)->udata);
+ printf(" %s", name);
+ else
+#endif
+ printf(" %p", (*sipp)->func);
+#if defined(DDB)
+ if (pname != NULL)
+ printf("(%s=%p)... ", pname, (*sipp)->udata);
else
#endif
- printf(" %p(%p)... ", (*sipp)->func,
- (*sipp)->udata);
+ printf("(%p)... ", (*sipp)->udata);
}
#endif
@@ -265,6 +278,10 @@
sysinit_end = newsysinit_end;
newsysinit = NULL;
newsysinit_end = NULL;
+#if defined(VERBOSE_SYSINIT)
+ if (verbose)
+ printf("VERBOSE_SYSINIT: new sysinit set found, processing restarted.\n");
+#endif
goto restart;
}
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list