From owner-freebsd-arm@FreeBSD.ORG Mon Dec 9 14:44:15 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA64BA17 for ; Mon, 9 Dec 2013 14:44:15 +0000 (UTC) Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [IPv6:2607:f8b0:400d:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5A73100D for ; Mon, 9 Dec 2013 14:44:15 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id c9so2734938qcz.16 for ; Mon, 09 Dec 2013 06:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ivaGL8js7cfaE2I5IhfrR4eLs98ANPhSlwQqrqdK5ds=; b=Yt2tArhOYQuNOSca6IRHcOed1LwGdB1wVcPsy/emdMOEOdmqKOGq3mLv0cIGKtxA8K VFMJW1kEYMuBvbggX8nK2aGjY0smWZt/1C0tb8KYUwBPpgnZdh7OE7D9b+wK5YfcYkaH 7ijkcOpWlYL4y5i6ntBZVgBs8WcTD24ivn9LsqWuiE6SB9nnh+GBVF0XxhyiuP5poZJn lvvWGDa0WOqeMrJn/zfN1/mF6rjIZ/bfYkxpkTkwa55E1LmbecthflRl6cXXSSsfa1Gw o5VF1qqipSTlSODBj1UP5YyNzR/20gpBQjdl565Vq15FhRTG47sYqHt48MNF8YsGiwUV tn8w== MIME-Version: 1.0 X-Received: by 10.224.111.195 with SMTP id t3mr34226253qap.98.1386600254864; Mon, 09 Dec 2013 06:44:14 -0800 (PST) Received: by 10.224.130.194 with HTTP; Mon, 9 Dec 2013 06:44:14 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Dec 2013 22:44:14 +0800 Message-ID: Subject: Re: [PATCH] Add stack unwind support for the functions in .ko From: Howard Su To: freebsd-arm Content-Type: multipart/mixed; boundary=047d7b60457ea31a1d04ed1b07e0 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 14:44:16 -0000 --047d7b60457ea31a1d04ed1b07e0 Content-Type: text/plain; charset=ISO-8859-1 Here is a new version which solve the unreadable $a problem. (the fix is in ddb/db_main.c in the end of the patch.) I attached the diff for review. Howard On Saturday, December 7, 2013, Howard Su wrote: > I need this function when working on dtrace/arm support. the basic idea is > locate the ARM.EXIDX section by the symbol __exidx_start and __exidx_stop. > > To keep it simple, I always look through the link_file_list when unwind > the stack. From the testing, the performance seems ok. > > Also, I implement the count parameter when unwind the stack which can make > 'show threads' output more readable. I also disabled some print output by > #if 0 which makes output more align with the other platform. > > Please review. > > Thanks, > > Howard Su > > > -- -Howard --047d7b60457ea31a1d04ed1b07e0 Content-Type: text/x-patch; charset=US-ASCII; name="unwind.2.patch" Content-Disposition: attachment; filename="unwind.2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 28885608c4f0bc6a_0.1 ZGlmZiAtLWdpdCBhL3N5cy9hcm0vYXJtL2RiX3RyYWNlLmMgYi9zeXMvYXJtL2FybS9kYl90cmFj ZS5jCmluZGV4IDU3MTE5ZGEuLjExOTQxMmMgMTAwNjQ0Ci0tLSBhL3N5cy9hcm0vYXJtL2RiX3Ry YWNlLmMKKysrIGIvc3lzL2FybS9hcm0vZGJfdHJhY2UuYwpAQCAtMzgsNiArMzgsNyBAQCBfX0ZC U0RJRCgiJEZyZWVCU0QkIik7CiAjaW5jbHVkZSA8c3lzL3Byb2MuaD4KIC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