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

Re: [Xen-devel] [PATCH] Oprofile patch for 2.6.27 tree. Fix collisionbe

To: Steven Smith <steven.smith@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Oprofile patch for 2.6.27 tree. Fix collisionbetween Xen and Cell processor escape codes
From: Jean Guyader <jean.guyader@xxxxxxxxx>
Date: Fri, 26 Jun 2009 09:25:20 +0100
Cc: Steven Smith <Steven.Smith@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, ian.campbell@xxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>, "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
Delivery-date: Fri, 26 Jun 2009 01:26:19 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xL4/BhJl8kH3IOb4+a3WUbPn8xmh1oanmPuuCxCqZDM=; b=sFu6pzxbzSHTB/yEJ0RXmzMluihSKSmBLL0EFcgbxLvYRj0X3p85/QmqdX7tg6XTVZ SYxNMSNGwtFXEvFdkTSzhHwmOZk2z9WEsxxnO781Y0wYBtdK6Jq+gHemBSzRCpDGtwdO CFwWVz006gIXq8aQ2r2ctQ4QM7ZoYMUEDQbos=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fEsLFw2hsXBMgRZgwmjxw3Ljh1DN4Vg5He13galSWO2wwAPeYGNm11VvsMvy4ZYga7 c6Fq/vNLwkWhYX/3p4GXJ1J1YqVHTxM6A/v2PfN4fB2dizip+IbI2Vv7Ou1YuXv/gAxM HhUu4jHe2sj6uV/JLikKK9eptYbc+qVfbxFPs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090625095055.GA19282@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20090609084651.GA14593@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090616103822.GA32136@xxxxxxxxxxxxxxxxxxxxxxxxxx> <EF547E542C520A4D858CFEF5B404D053477FA5EE8B@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090619173009.GA13896@xxxxxxxxxxxxxxxxxxxxxxxxxx> <EF547E542C520A4D858CFEF5B404D0534AFCC752B2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090619215857.GA14674@xxxxxxxxxxxxxxxxxxxxxxxxxx> <EF547E542C520A4D858CFEF5B404D0534AFCEC3AA2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A41FCB10200007800007522@xxxxxxxxxxxxxxxxxx> <EF547E542C520A4D858CFEF5B404D0534AFD739129@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090625095055.GA19282@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
2009/6/25 Steven Smith <steven.smith@xxxxxxxxxx>:
>> > I'm a little confused by this: Upstream oprofile 0.9.4 has
>> > the same workaround implemented on the user mode side of
>> > things, so adjusting this in the kernel now would make the
>> > kernel incompatible with that and future versions. Jan
>>   The fact that oprofile user level code has the same workaround
>>   is exactly the reason for this patch.
>>   We need the same code values in the kernel and in the user level tools.
>>   Right now the kernel generates code 13 for DOMAIN_SWITCH_CODE
>>   in x86 and Oprofile daemon complains that there is no such code.
>>   (it expects code 11 for that).
>>
>>   However, your question made me look at Oprofile 0.9.4 and I noticed
>>   this workaround changed slightly from 0.9.3 to 0.9.4.
>>   The new code checks for powerpc while 0.9.3 checked for
>>   x96 and ia64. So we need a slightly different patch.
>>
>>   Please use the new attached patch instead of the original one.
> Ian: Can you apply this to the 2.6.27 tree, please?  I'll pull it
> through to NC2 from there.
>

I've applied this patch on the XCI 2.6.27 tree, it should be available soon.

Thanks,
Jean

>
>>     Fix OProfile escape code collision between Xenoprof's
>>     DOMAIN_SWITCH_CODE (in use on x86 and ia64) and Cell's
>>     SPU_PROFILING_CODE(in use with Power).
>>
>>     Signed-off-by: Jose Renato Santos <jsantos@xxxxxxxxxx>
>>
>> diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
>> index bb8a349..8863734 100644
>> --- a/include/linux/oprofile.h
>> +++ b/include/linux/oprofile.h
>> @@ -37,9 +37,18 @@
>>  #define TRACE_BEGIN_CODE             8
>>  #define TRACE_END_CODE                       9
>>  #define XEN_ENTER_SWITCH_CODE                10
>> +/*
>> + * Ugly work-around for the unfortunate collision between Xenoprof's
>> + * DOMAIN_SWITCH_CODE (in use on x86 and ia64) and Cell's SPU_PROFILING_CODE
>> + * (in use with Power):
>> + */
>> +#ifdef CONFIG_PPC
>>  #define SPU_PROFILING_CODE           11
>>  #define SPU_CTX_SWITCH_CODE          12
>>  #define DOMAIN_SWITCH_CODE           13
>> +#else
>> +#define DOMAIN_SWITCH_CODE           11
>> +#endif
>>
>>  struct super_block;
>>  struct dentry;
>>
>>
>
>
>
>
>> > >>> "Santos, Jose Renato G" <joserenato.santos@xxxxxx> 23.06.09 20:13
>> > >>> >>>
>> >
>> > Steven
>> >
>> > This is a fix to enable Oprofile to work on the netchannel2
>> > 2.6.27 tree.
>> >
>> > This is to address a collision for escape codes used to
>> > represent domain switches in Xen and CPU switches in cell
>> > processors which were developed in parallel and used the same code.
>> >
>> > There was a discussion on the Oprofile mailing list a while
>> > ago and it was decided that we would use different Oprofile
>> > codes for x86 and ia64 archs (which are the only ones that
>> > support Oprofile in Xen) in order to preserve backward
>> > compatibility for users.
>> >
>> > The Oprofile user level tools expect different escape codes
>> > depending on the architecture. We need to make sure the
>> > kernel generates compatible escape codes.
>> >
>> > I think this should be also pushed to the 2.6.27 XenClient tree.
>> >
>> > Thanks
>> >
>> > Renato
>> >
>> >
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFKQ0h/vAgSWYI3DVMRAvrQAKCfV2YQ85vQYGIUGWPzQHYuIBC6+QCgsgWA
> qxfSjs0f9H5JTvl+gU1ibHo=
> =rRNP
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>

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