Date: Sat, 5 Jan 2008 14:22:38 +0100 (CET) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/119358: SYSINIT_VERBOSE can be more verbose Message-ID: <200801051322.m05DMcuC041438@kulesh.obluda.cz> Resent-Message-ID: <200801051330.m05DU1il027215@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801051322.m05DMcuC041438>