[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] RE: [PATCH] Xenoprof passive domain support



"Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx> wrote on 04/29/2006 05:46:27 AM:

> Renato,
> I remade the patch. It has several improvements.
> 1) Add a lock for preventing more than one LPs of dom0 from
> accessing to passive domain concurrently.
> 2) Add escape code only at the beginning and end of a bunch of
> passive domain samples, which dom0 handles one time. Originally we
> added escape code in front of every passive domain sample. That's
inefficient.
> 3) Reuse "normal ESCAPE_CODE" of oprofile to add passive domain
> switch event into the CPU buffer.
>
> Thanks,
> -Xiaowei

I tried the patch.  The build of a xen0 kernel fails with:
arch/i386/oprofile/../../../drivers/oprofile/oprof.c:41: error:
?MAX_OPROF_DOMAINS? undeclared here (not in a function)
arch/i386/oprofile/../../../drivers/oprofile/oprof.c: In function
?oprofile_set_active?:
arch/i386/oprofile/../../../drivers/oprofile/oprof.c:45: error: ?struct
oprofile_operations? has no member named ?set_active?
arch/i386/oprofile/../../../drivers/oprofile/oprof.c:46: error: ?struct
oprofile_operations? has no member named ?set_active?
arch/i386/oprofile/../../../drivers/oprofile/oprof.c: In function
?oprofile_set_passive?:
arch/i386/oprofile/../../../drivers/oprofile/oprof.c:56: error: ?struct
oprofile_operations? has no member named ?set_passive?
arch/i386/oprofile/../../../drivers/oprofile/oprof.c:57: error: ?struct
oprofile_operations? has no member named ?set_passive?
make[1]: *** [arch/i386/oprofile/../../../drivers/oprofile/oprof.o] Error 1
make: *** [arch/i386/oprofile] Error 2

It appears that the patch to patches/linux-2.6.16/xenoprof-generic.patch is
not correct.  For example:

-diff -pruN ../pristine-linux-2.6.16/include/linux/oprofile.h
./include/linux/oprofile.h
---- ../pristine-linux-2.6.16/include/linux/oprofile.h  2006-03-20
05:53:29.000000000 +0000
-+++ ./include/linux/oprofile.h 2006-04-03 15:53:05.000000000 +0100
-@@ -16,6 +16,8 @@
- #include <linux/types.h>
- #include <linux/spinlock.h>
- #include <asm/atomic.h>
-+
-+#include <xen/interface/xenoprof.h>
-
- struct super_block;
- struct dentry;
-@@ -27,6 +29,8 @@ struct oprofile_operations {
-       /* create any necessary configuration files in the oprofile fs.
-        * Optional. */
-       int (*create_files)(struct super_block * sb, struct dentry * root);
-+      /* setup active domains with Xen */
-+      int (*set_active)(int *active_domains, unsigned int adomains);
-       /* Do any necessary interrupt setup. Optional. */
-       int (*setup)(void);
-       /* Do any necessary interrupt shutdown. Optional. */

removes the xenoprof support from include/linux/oprofile.h rather than
adding the filed for set_passive to struct oprofile_operations.

The initial patch released on 2006/04/28 had it correct:

 diff -pruN ../pristine-linux-2.6.16/include/linux/oprofile.h
./include/linux/oprofile.h
---- ../pristine-linux-2.6.16/include/linux/oprofile.h  2006-03-20
05:53:29.000000000 +0000
-+++ ./include/linux/oprofile.h 2006-04-03 15:53:05.000000000 +0100
+--- ../pristine-linux-2.6.16/include/linux/oprofile.h  2006-04-27
16:22:31.000000000 +0800
++++ ./include/linux/oprofile.h 2006-04-25 17:20:36.000000000 +0800
 @@ -16,6 +16,8 @@
  #include <linux/types.h>
  #include <linux/spinlock.h>
@@ -373,12 +508,14 @@

  struct super_block;
  struct dentry;
-@@ -27,6 +29,8 @@ struct oprofile_operations {
+@@ -27,6 +29,10 @@ struct oprofile_operations {
        /* create any necessary configuration files in the oprofile fs.
         * Optional. */
        int (*create_files)(struct super_block * sb, struct dentry * root);
 +      /* setup active domains with Xen */
 +      int (*set_active)(int *active_domains, unsigned int adomains);
++      /* setup passive domains with Xen */
++      int (*set_passive)(struct xenoprof_passive *passive_domains,
unsigned int pdomains);
        /* Do any necessary interrupt setup. Optional. */
        int (*setup)(void);
        /* Do any necessary interrupt shutdown. Optional. */

I'll hack my copy of the patch for now.  You may want to revisit how the
patch is created.

Steve D.


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.