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/
Home Products Support Community News


RE: [Xen-devel] xenoprof passive profiling and "mode" setting

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Ray Bryant" <raybry@xxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xenoprof passive profiling and "mode" setting
From: "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>
Date: Thu, 6 Jul 2006 10:53:35 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 05 Jul 2006 19:54:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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: AcaggwqzcNow4fC2Scy/+fggmHFajAAIUJBA
Thread-topic: [Xen-devel] xenoprof passive profiling and "mode" setting
>guest_kernel_mode() does not work for HVM guests. It may need to be
>fixed -- it had previously only been used in paravirtual-only contexts.
>It might make sense to invert[*] the predicate and rename to
>user_mode(). Then definition is simply ring_3(regs) for x86/32 and
>(ring_3(regs) && !((v)->arch.flags & TF_kernel_mode)) for x86/64.
>So maybe:
>   int mode = 2;
>   if (guest_mode(regs))
>       mode = user_mode(current, regs) ? 0 : 1;
Yes, this is a better solution for sure, to take both para-domain and
hvm into account. 
But it's not a problem for now:) _mode_ logic only applies to active
domiain. Oprofile doesn't use it for samples between PASSIVE_START_CODE
and PASSIVE_STOP_CODE. Rather it relies on PC range to distinguish
xen/kernel/app samples. 


Xen-devel mailing list