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-devel

[Xen-devel] RE: Question: Dynamic code in x86_64 Xen

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: Question: Dynamic code in x86_64 Xen
From: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
Date: Tue, 10 Jul 2007 22:06:45 -0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 10 Jul 2007 15:04:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2B9C035.A9D8%keir@xxxxxxxxxxxxx>
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>
References: <08CA2245AFCF444DB3AC415E47CC40AFD02898@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C2B9C035.A9D8%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfCeLas9RtSXi5rEdybDQAWy6hiGQAAJUBxAClLUyAAAPItIAAG5CB1AAAmEeA=
Thread-topic: Question: Dynamic code in x86_64 Xen
Thanks, Keir. That explains it ...
Glad to know this is not a xenoprof bug :)

Regards

Renato 

>> -----Original Message-----
>> From: Keir Fraser [mailto:keir@xxxxxxxxxxxxx] 
>> Sent: Tuesday, July 10, 2007 3:01 PM
>> To: Santos, Jose Renato G
>> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: Question: Dynamic code in x86_64 Xen
>> 
>> On 10/7/07 19:47, "Santos, Jose Renato G" 
>> <joserenato.santos@xxxxxx> wrote:
>> 
>> > Could you please help me understand some Xen code profile that I 
>> > cannot explain?
>> > When running netperf on x86_64 Xen, oprofile reports that 
>> 2% of the PC 
>> > samples are not recognized (i.e. they correspond to code 
>> outside the 
>> > ".text" section reported on xen image file). I added some 
>> > instrumentation in oprofile and observed that these PC samples are 
>> > located in:
>> > 1) for dom0: in Xen BSS section (more specifically on cpu0_stack)
>> > 2) for domU: outside any section specified in Xen image 
>> file  (i.e. 
>> > dynamically allocated memory)
>> 
>> Yes, these are executions on the stack. This is expected 
>> behaviour for x86_64. The syscall instruction enters Xen via 
>> a stack trampoline. This is because syscall does not switch 
>> %rsp for us. Hence using a stack trampoline cunningly lets 
>> us compute %rsp from %rip.
>> 
>> If you see 2% of your samples in the syscall trampoline, 
>> this probably indicates mainly that the processor is 
>> spending ~2% of its time doing a syscall transition (and 
>> then the NMI occurs on teh very first instruction executed in Xen).
>> 
>>  -- Keir
>> 
>> > I suspect case 2 is also a stack for a different CPU which is 
>> > dynamically allocated (and used in the CPU that the guest is 
>> > executing) but I am not sure...
>> >  
>> > Anyway, why whould Xen execute any code from the stack? Is this 
>> > expected Xen behavior or this is a bug somewhere (probably in 
>> > xenoprofile)?
>> > I did not see this behavior in the past when I was using 
>> x86_32 Xen.
>> > Could you please shed some light on this ...
>> 
>> 

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