From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 5 13:30:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94B8416A47C for ; Sat, 5 Jan 2008 13:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8812F13C45D for ; Sat, 5 Jan 2008 13:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m05DU1hq027218 for ; Sat, 5 Jan 2008 13:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m05DU1il027215; Sat, 5 Jan 2008 13:30:01 GMT (envelope-from gnats) Resent-Date: Sat, 5 Jan 2008 13:30:01 GMT Resent-Message-Id: <200801051330.m05DU1il027215@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24F816A419 for ; Sat, 5 Jan 2008 13:22:54 +0000 (UTC) (envelope-from dan@kulesh.obluda.cz) Received: from smtp1.kolej.mff.cuni.cz (smtp1.kolej.mff.cuni.cz [78.128.192.10]) by mx1.freebsd.org (Postfix) with ESMTP id 7B00913C43E for ; Sat, 5 Jan 2008 13:22:54 +0000 (UTC) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (openvpn.ms.mff.cuni.cz [195.113.20.87]) by smtp1.kolej.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id m05DMc3Z056560 for ; Sat, 5 Jan 2008 14:22:40 +0100 (CET) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (localhost. [127.0.0.1]) by kulesh.obluda.cz (8.14.2/8.14.2) with ESMTP id m05DMcmQ041439 for ; Sat, 5 Jan 2008 14:22:38 +0100 (CET) (envelope-from dan@kulesh.obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.14.2/8.14.1/Submit) id m05DMcuC041438; Sat, 5 Jan 2008 14:22:38 +0100 (CET) (envelope-from dan) Message-Id: <200801051322.m05DMcuC041438@kulesh.obluda.cz> Date: Sat, 5 Jan 2008 14:22:38 +0100 (CET) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/119358: SYSINIT_VERBOSE can be more verbose X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 13:30:01 -0000 >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: