WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-devel] [Patch][0/2]implement dump_execution_state() on ia64

To: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch][0/2]implement dump_execution_state() on ia64
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 19:22:07 +0000
Delivery-date: Thu, 27 Mar 2008 12:23:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <82C8902F1E97A4takebe_akio@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciQP9iFF0aEpvwzEdy6mwAWy6hiGQ==
Thread-topic: [Xen-devel] [Patch][0/2]implement dump_execution_state() on ia64
User-agent: Microsoft-Entourage/11.4.0.080122
On 27/3/08 17:22, "Akio Takebe" <takebe_akio@xxxxxxxxxxxxxx> wrote:

>> There is already a function which does what you want (i.e., takes a
>> cpu_user_regs pointer) -- it's called show_execution_state().
>> 
>> On x86 we implement dump_execution_state() by forcing an exception (by
>> executing an invalid opcode) and dumping the calltrace from within the
>> exception handler. This works because the exception handler has a
>> cpu_user_regs pointer and hence can call show_execution_state(). We use the
>> same trick for handling BUG() and ASSERT(). The code concerned is in
>> arch/x86/traps.c:do_invalid_op().
> On x86, does "xm debug-key d" make system hang?
> Or it just uses the exception handler, not hangup?

It works fine. It uses dump_execution_state(), as you have seen when you
modified it, and hence it does indeed force an exception on each CPU in
turn, and the exception handler dumps the cpu_user_regs (also known as
'pt_regs' in ia64) pointer that it receives.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel