From owner-freebsd-arch@FreeBSD.ORG Tue Feb 12 16:41:42 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E80AD260 for ; Tue, 12 Feb 2013 16:41:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by mx1.freebsd.org (Postfix) with ESMTP id B1B18105 for ; Tue, 12 Feb 2013 16:41:42 +0000 (UTC) Received: by mail-ob0-f170.google.com with SMTP id wc20so277740obb.29 for ; Tue, 12 Feb 2013 08:41:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=XhyvYGIouVRBoBmeTlTZ0Cu5lPE6BuWFLiTaM2VZpBQ=; b=L+ZsClKnL3UV5fMtY8ZKcOiLdeVaMKa7niZhvWMzZt6d2SXJF5hZo4iWxowQpXKLz4 EmQfClbanOlQAl1jUfee6Mk/UhJdWmAo+KGrKx0Mu7Y9sPmWMYrNEZg6xZtDoOl2LvxZ OQMmJBf1JPKzmO3fDJFIeWy7axBZDROrcoJgFNiPbtNWbG3CA1VHzc15YuTlIld5GTbN Vqj8UtZoeEKnKryG/xIUPu0inCKnHAIz5lxxR2poNYw3LmQFAuA56qdQLEO4SEI0N1Dr yVekzrnJ4kxBShxG08uVBvr3/7UPpRJLxnwawg9KqDlahVgHc7jF9bRzNZaEBvPew9As FIDA== X-Received: by 10.182.113.40 with SMTP id iv8mr13749528obb.12.1360686876415; Tue, 12 Feb 2013 08:34:36 -0800 (PST) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPS id ka6sm44185406obb.3.2013.02.12.08.34.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Feb 2013 08:34:34 -0800 (PST) Sender: Warner Losh Subject: Re: Proposal: Unify printing the function name in panic messages() Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201302120615.r1C6FpP8086860@chez.mckusick.com> Date: Tue, 12 Feb 2013 09:34:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <5DCB8A72-ABD8-4E8B-8595-EDEBEE70C6AB@bsdimp.com> References: <201302120615.r1C6FpP8086860@chez.mckusick.com> To: Kirk McKusick X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQnVb9g+085/bZgU/LNKMTMEnNBXVFcVIGwD4ABAT1lZ+2yhQt4jUZlJtRSIXNTnVO6R8j3x Cc: Adrian Chadd , Christoph Mallon , Andriy Gapon , mike@karels.net, freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 16:41:43 -0000 On Feb 11, 2013, at 11:15 PM, Kirk McKusick wrote: >> To: Kirk McKusick >> cc: John Baldwin , Adrian Chadd = , >> Christoph Mallon , >> Andriy Gapon , freebsd-arch@freebsd.org >> From: Mike Karels >> Subject: Re: Proposal: Unify printing the function name in panic = messages()=20 >> Date: Tue, 12 Feb 2013 00:01:07 -0600 >>=20 >> I'm not arguing against consistency, nor even agaist the proposal = itself >> (as modified for a lower-case panic macro). However, I don't think = the >> lack of consistency is the real problem. "panic: watchdog timeout" = tells >> me what I need to know, whether or not it includes "watchdog_fire" or = the >> line number. The only problem that has been pointed out is lack of >> uniqueness. That is a simpler problem to handle, and isn't handled = by >> the current proposal as I understand it. >>=20 >> Mike >=20 > Though the default for the current proposal gives just the function = name, > in its verbose mode it give file, function, and line number. And in = its > lean and mean mode, just the error string. This replacing the = hodge-podge > that we have now. My main point is that it is a significant = improvement > over what we have now. I'm all for consistency, and I'm also all for having knobs that let = people limit what is printed. In some environments, I'd love to have the = file/line number. Why? Because I'm lazy and it saves me a grep: I'd be = trading space for convenience. In others, where I'm more space = constrained, I'd love to just have the raw message and suffer the = ambiguity we have today (or fix things so they aren't ambiguous). I too am having difficulty understanding the resistance to the basic = proposal: (1) Make panic messages suck less by removing bogus function names. (2) Hack the panic() to make it a macro so you can add function name or = file + line or the MJD of the last leap second to the panic messages. (1) is like no-brainer yes. (2) is infinite bike-shed land, but if we = have the basic macro there, maybe with a simple/gaudy kernel config then = people that want a different kind of gaudy have an easy hack. I'm still having trouble seeing the down side, except maybe your brand = of gaudy is considered too passe' to be allowed in :) Warner=