[Xen-ia64-devel] [PATCH][RFC]xenperf hypercall pretty print TAKE 2

2006-08-24 Thread Ken Hironaka
This patch pretty prints the hypercall section for

$xenperf -f

Each hypercall count is tagged by its name.

Reference:
http://lists.xensource.com/archives/html/xen-ia64-devel/2006-08/msg00261.html

Signed-off-by Ken Hironaka [EMAIL PROTECTED]


diff -r 3e54734e55f3 tools/misc/xenperf.c
--- a/tools/misc/xenperf.c	Wed Aug 23 13:26:46 2006 -0600
+++ b/tools/misc/xenperf.c	Thu Aug 24 18:01:41 2006 +0900
@@ -10,13 +10,81 @@
  * Description: 
  */
 
-
 #include xenctrl.h
 #include stdio.h
 #include stdlib.h
 #include sys/mman.h
 #include errno.h
 #include string.h
+
+const char* hypercall_name_table[64]=
+{
+[__HYPERVISOR_set_trap_table] = set_trap_table,/*0*/
+[__HYPERVISOR_mmu_update] = mmu_update,/*1*/
+[__HYPERVISOR_set_gdt] = set_gdt,  /*2*/
+[__HYPERVISOR_stack_switch] = stack_switch,/*3*/
+[__HYPERVISOR_set_callbacks] = set_callbacks,  /*4*/
+[__HYPERVISOR_fpu_taskswitch] = fpu_taskswitch,/*5*/
+[__HYPERVISOR_sched_op_compat] = sched_op_compat,  /*6*/
+[__HYPERVISOR_dom0_op] = dom0_op,  /*7*/
+[__HYPERVISOR_set_debugreg] = set_debugreg,/*8*/
+[__HYPERVISOR_get_debugreg] = get_debugreg,/*9*/
+[__HYPERVISOR_update_descriptor] = update_descriptor,  /*10*/
+[11] = NULL,   /*11*/
+[__HYPERVISOR_memory_op] = memory_op,  /*12*/
+[__HYPERVISOR_multicall] = multicall,  /*13*/
+[__HYPERVISOR_update_va_mapping] = update_va_mapping,  /*14*/
+[__HYPERVISOR_set_timer_op] = set_timer_op,/*15*/
+[__HYPERVISOR_event_channel_op_compat] = event_channel_op_compat,  /*16 compat since 0x00030202 */
+[__HYPERVISOR_xen_version] = xen_version,  /*17*/
+[__HYPERVISOR_console_io] = console_io,/*18*/
+[__HYPERVISOR_physdev_op_compat] = physdev_op_compat,  /*19  compat since 0x00030202 */
+[__HYPERVISOR_grant_table_op] = grant_table_op,/*20*/
+[__HYPERVISOR_vm_assist] = vm_assist,  /*21*/
+[__HYPERVISOR_update_va_mapping_otherdomain] = update_va_mapping_otherdomain, /*22*/
+[__HYPERVISOR_iret] = iret,/*23  x86 only */
+[__HYPERVISOR_vcpu_op] = vcpu_op,  /*24*/
+[__HYPERVISOR_set_segment_base] = set_segment_base,/*25  x86/64 only */
+[__HYPERVISOR_mmuext_op] = mmuext_op,  /*26*/
+[__HYPERVISOR_acm_op] = acm_op,/*27*/
+[__HYPERVISOR_nmi_op] = nmi_op,/*28*/
+[__HYPERVISOR_sched_op] = sched_op,/*29*/
+[__HYPERVISOR_callback_op] = callback_op,  /*30*/
+[__HYPERVISOR_xenoprof_op] = xenoprof_op,  /*31*/
+[__HYPERVISOR_event_channel_op] = event_channel_op,/*32*/
+[__HYPERVISOR_physdev_op] = physdev_op,/*33*/
+[__HYPERVISOR_hvm_op] = hvm_op,/*34*/
+[35] = NULL,   /*35*/
+[36] = NULL,   /*36*/
+[37] = NULL,   /*37*/
+[38] = NULL,   /*38*/
+[39] = NULL,   /*39*/
+[40] = NULL,   /*40*/
+[41] = NULL,   /*41*/
+[42] = NULL,   /*42*/
+[43] = NULL,   /*43*/
+[44] = NULL,   /*44*/
+[45] = NULL,   /*45*/
+[46] = NULL,   /*46*/
+[47] = NULL,   /*47*/
+/* Architecture-specific hypercall definitions. */
+[__HYPERVISOR_arch_0] = arch_0,/*48

[Xen-ia64-devel] [PATCH][RFC]xenperf hypercall pretty print

2006-08-18 Thread Ken Hironaka
this patch pretty prints the hypercall section for

$xenperf -f

previously, xenperf -f simply listed counts for all hyper calls. I added
a hypercall index to this so it will be easier to tell which hypercall
was called how many times. this is an architecture independent patch.

Signed-off-by: Ken Hironaka [EMAIL PROTECTED]


diff -r 8c6bb45901e7 tools/misc/xenperf.c
--- a/tools/misc/xenperf.c	Wed Aug 16 14:28:57 2006 -0600
+++ b/tools/misc/xenperf.c	Fri Aug 18 18:30:48 2006 +0900
@@ -10,13 +10,81 @@
  * Description: 
  */
 
-
 #include xenctrl.h
 #include stdio.h
 #include stdlib.h
 #include sys/mman.h
 #include errno.h
 #include string.h
+
+const char* hypercall_name_table[64]=
+{
+set_trap_table,//0
+mmu_update,//1
+set_gdt,   //2
+stack_switch,  //3
+set_callbacks, //4
+fpu_taskswitch,//5
+sched_op_compat,   //6
+dom0_op,   //7
+set_debugreg,  //8
+get_debugreg,  //9
+update_descriptor, //10
+NULL,  //11
+memory_op, //12
+multicall, //13
+update_va_mapping, //14
+set_timer_op,  //15
+event_channel_op_compat,// 16 /* compat since 0x00030202 */
+xen_version,   //17
+console_io,//18
+physdev_op_compat, //19 /* compat since 0x00030202 */
+grant_table_op,//20
+vm_assist, //21
+update_va_mapping_otherdomain, //22
+iret,  //23 /* x86 only */
+vcpu_op,   //24
+set_segment_base,  //25 /* x86/64 only */
+mmuext_op, //26
+acm_op,//27
+nmi_op,//28
+sched_op,  //29
+callback_op,   //30
+xenoprof_op,   //31
+event_channel_op,  //32
+physdev_op,//33
+hvm_op,//34
+NULL,  //35
+NULL,  //36
+NULL,  //37
+NULL,  //38
+NULL,  //39
+NULL,  //40
+NULL,  //41
+NULL,  //42
+NULL,  //43
+NULL,  //44
+NULL,  //45
+NULL,  //46
+NULL,  //47
+/* Architecture-specific hypercall definitions. */
+arch_0,//48
+arch_1,//49
+arch_2,//50
+arch_3,//51
+arch_4,//52
+arch_5,//53
+arch_6,//54
+arch_7,//55
+NULL,  //56
+NULL,  //57
+NULL,  //58
+NULL,  //59
+NULL,  //60
+NULL,  //61
+NULL,  //62
+NULL   //63
+};
 
 int main(int argc, char *argv[])
 {
@@ -117,10 +185,17 @@ int main(int argc, char *argv[])
 sum += val[j];
 printf (T=%10u , (unsigned int)sum);
 
-if ( full || (pcd[i].nr_vals = 4) )
+if ( full || (pcd[i].nr_vals = 4) ){
+			if( strcmp(pcd[i].name, hypercalls) == 0 ){
+for( j = 0; j  pcd[i].nr_vals; j++ )
+	printf(%s\t, hypercall_name_table[j]);
+printf(\n);
+			}
 for ( j = 0; j  pcd[i].nr_vals; j++ )
 printf( %10u, (unsigned int)val[j]);
 
+		}
+
 printf(\n);
 		val += pcd[i].nr_vals;
 }

___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

Re: [Xen-ia64-devel] a problem with performance tuning TAKE 3

2006-08-17 Thread Ken Hironaka
Hi Isaku,

 Your .config file did the trick and the installation went very
smoothly. Thank you for your help!

Ken

On Thu, 2006-08-17 at 16:51 +0900, Isaku Yamahata wrote:
 On Thu, Aug 17, 2006 at 03:36:19PM +0900, Ken Hironaka wrote:
  Hi Isaku,
  
Thank you on your advice on the changeset. The patch worked just
  fine(except for the copyright section at 5/10 but that's no big
  problem). I am now trying to install it all. My understanding is that
  you have to have 
  CONFIG_XEN_IA64_TLB_TRACK
  CONFIG_XEN_IA64_PERVCPU_VHPT
  options on. I would like to know how exactly you do that at compile
  time. I'd tried adding
  CONFIG_XEN_IA64_TLB_TRACK=y
  CONFIG_XEN_IA64_PERVCPU_VHPT=y
  to the top level makefile and the Rules.mk under xen/arch/ia64
  but in either case, it has not worked.
 
 Hi Ken.
 To give these options for xen, use .config under the xen directory.
 In your case, create xen-ia64-unstable-PATCHED.hg/.config
 and add the following two lines
 xen_ia64_tlb_track=y
 xen_ia64_pervcpu_vhpt=y
 
 It is also O.K. to edit Rules.mk. But you should add 
 the above two lines. not CONFIG_XEN_IA64_xxx=y.
 FYI I use the following xen .config
 $ cat .config
 crash_debug=y
 debug=y
 verbose=y
 xen_ia64_tlb_track=y
 xen_ia64_pervcpu_vhpt=y
 perfc=y
 perfc_arrays=n
 
 
  I got the following error in while make world
  
  ld -g -T xen.lds.s -N \
  -Map map.out
  linux-xen/head.o 
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/common/built_in.o 
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/drivers/built_in.o 
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/arch/ia64/built_in.o -o 
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/xen-syms
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/arch/ia64/built_in.o(.text
  +0x2722): In function `arch_domain_create':
  /home/ken/xen-ia64-unstable-PATCHED.hg/xen/arch/ia64/xen/domain.c:416:
  undefined reference to `tlb_track_destroy'
  gcc -O2 -fomit-frame-pointer -DNDEBUG -Wall -Wstrict-prototypes
  -Wdeclaration-after-statement  -D__XEN_TOOLS__ -Werror
  -I ../../tools/python/xen/lowlevel/xc -I ../../tools/libxc -o xc_shadow
  xc_shadow.o -L../../tools/libxc -lxenctrl
  make[4]: *** [/home/ken/xen-ia64-unstable-PATCHED.hg/xen/xen-syms] Error
  1
  make[4]: Leaving directory
  `/home/ken/xen-ia64-unstable-PATCHED.hg/xen/arch/ia64'
  make[3]: *** [/home/ken/xen-ia64-unstable-PATCHED.hg/xen/xen] Error 2
  make[3]: Leaving directory `/home/ken/xen-ia64-unstable-PATCHED.hg/xen'
  make[2]: *** [install] Error 2
  make[2]: Leaving directory `/home/ken/xen-ia64-unstable-PATCHED.hg/xen'
  make[1]: *** [install-xen] Error 2
  make[1]: *** Waiting for unfinished jobs
 
 
 Hmm, Anyway this is a compilation bug which depends on configuration.
 I'll fix it next post.
 Thanks.


___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel


[Xen-ia64-devel] a problem with performance tuning TAKE 3

2006-08-15 Thread Ken Hironaka
This is in reference to your patch posted at

http://lists.xensource.com/archives/html/xen-ia64-devel/2006-08/msg00149.html
I tried to use your patch on the latest Xen-ia64-unstable but failed.
my changeset is 11044:42a170218b63
I also tried the 10939 changeset with which you posted 2/10 of your
patch, but with no avail also.
Can you enlighten me on how to make this patch work? Thank you.

Ken Hironaka


___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel