ia64/xen-unstable

changeset 16794:7238393ef220

[IA64] xenoprof/ia64 howto

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:11:01 2008 -0700 (2008-01-17)
parents 003036d7db0f
children 44aca51a4b7b
files xen/arch/ia64/tools/README.xenoprof
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xen/arch/ia64/tools/README.xenoprof	Thu Jan 17 12:11:01 2008 -0700
     1.3 @@ -0,0 +1,154 @@
     1.4 +			Xenoprof/IA64 HOWTO
     1.5 +
     1.6 +                          Written by Isaku Yamahata <yamahata at valinux co jp>
     1.7 +                                                                 15th Jan, 2008
     1.8 +
     1.9 +
    1.10 +Introduction
    1.11 +------------
    1.12 +This documents describes how to use xenoprof/ia64.
    1.13 +See oprofile site for the details of oprofile itself.
    1.14 +
    1.15 +
    1.16 +Reference
    1.17 +---------
    1.18 +oprofile
    1.19 +http://oprofile.sourceforge.net/news/
    1.20 +
    1.21 +xenoprof
    1.22 +http://xenoprof.sourceforge.net/
    1.23 +
    1.24 +
    1.25 +Requirement
    1.26 +-----------
    1.27 +- xen VMM
    1.28 +  xen-ia64-devel.hg c/s 16632:2900e4dacaa7 or later
    1.29 +  Probably xen 3.2 or later would be OK.
    1.30 +
    1.31 +- dom0/domU Linux
    1.32 +  linux kernel tree corresponding to xen VMM.
    1.33 +
    1.34 +- Oprofile
    1.35 +  oprofile 0.9.3 or later
    1.36 +  get the patch for oprofile 0.9.3 from http://xenoprof.sourceforge.net/
    1.37 +  oprofile-0.9.3-xen-r2.patch or later
    1.38 +  NOTE:The xenoprof/IA64 specific part is already included in the development
    1.39 +       cvs tree.
    1.40 +
    1.41 +- Documentation
    1.42 +  You can find the documentation from http://xenoprof.sourceforge.net/.
    1.43 +  It doesn't cover IA64 specific part, but it almost applies.
    1.44 +
    1.45 +
    1.46 +Options to opcontrol
    1.47 +--------------------
    1.48 +You have to tell the oprofile daemon that the session is xenoprof one
    1.49 +by "--xen" option.
    1.50 +--xen=<xen_image_file>
    1.51 +  Specify the xen image.
    1.52 +--active-domains<list>
    1.53 +  Specify active domains
    1.54 +--passive-domains=<list>
    1.55 +  Specify passive domains
    1.56 +
    1.57 +
    1.58 +Examples
    1.59 +--------
    1.60 +- dom0 active, dom1 passive case example
    1.61 +  on dom0
    1.62 +  # opctonrol --start-daemon --xen=<path to xen-syms> \
    1.63 +    --vmlinux=<path to vmlinux> \
    1.64 +    --active-domains=0 --passive-domains=1
    1.65 +  # opcontrol --start
    1.66 +
    1.67 +  <make activity you want>
    1.68 +
    1.69 +  # opcontrol --stop (or opcontrol --shutdown)
    1.70 +  # opreport -l or something to get the result
    1.71 +
    1.72 +
    1.73 +- both dom0 and dom1 active example
    1.74 +  on dom0
    1.75 +  # opctonrol --start-daemon --xen=<path to xen-syms> \
    1.76 +    --vmlinux=<path to vmlinux> \
    1.77 +    --active-domains=0,1
    1.78 +
    1.79 +  on dom1
    1.80 +  # opctonrol --start-daemon --xen=<path to xen-syms> \
    1.81 +    --vmlinux=<path to vmlinux>
    1.82 +  domain1 isn't primary domain so that --active-domains/--passive-domains
    1.83 +  shouldn't be specified.
    1.84 +
    1.85 +  on dom0
    1.86 +  # opcontrol --start
    1.87 +  on dom1
    1.88 +  # opcontrol --start
    1.89 +
    1.90 +  <make activity you want>
    1.91 +
    1.92 +  on dom1
    1.93 +  # opcontrol --stop (or opcontrol --shutdown)
    1.94 +  on dom0
    1.95 +  # opcontrol --stop (or opcontrol --shutdown)
    1.96 +
    1.97 +  on dom0
    1.98 +  # opreport -l or something to get the result of dom0
    1.99 +  on dom1
   1.100 +  # opreport -l or something to get the result of dom1
   1.101 +
   1.102 +
   1.103 +Result example
   1.104 +--------------
   1.105 +The app name of non-dom0 domain would be domain<N>-{xen, kernel, modules, app}
   1.106 +where N is the domain id.
   1.107 +You may want to create domain<N>-xen domain<N>-kernel to get the symbol names.
   1.108 +
   1.109 +# opreport
   1.110 +CPU: Itanium 2, speed 1595 MHz (estimated)
   1.111 +Counted L2DTLB_MISSES events (L2DTLB Misses) with a unit mask of 0x00 (No unit mask) count 5000
   1.112 +L2DTLB_MISSES:...|
   1.113 +  samples|      %|
   1.114 +------------------
   1.115 +      242 40.2662 domain1-kernel
   1.116 +      176 29.2845 domain1-xen
   1.117 +      128 21.2978 domain1-apps
   1.118 +       55  9.1514 xen-syms
   1.119 +
   1.120 +# opreport -l
   1.121 +CPU: Itanium 2, speed 1595 MHz (estimated)
   1.122 +Counted L2DTLB_MISSES events (L2DTLB Misses) with a unit mask of 0x00 (No unit mask) count 5000
   1.123 +warning: /boot/domain1-xen could not be found.
   1.124 +warning: /domain1-apps could not be found.
   1.125 +warning: /domain1-kernel could not be found.
   1.126 +samples  %        app name                 symbol name
   1.127 +242      40.2662  domain1-kernel           (no symbols)
   1.128 +176      29.2845  domain1-xen              (no symbols)
   1.129 +128      21.2978  domain1-apps             (no symbols)
   1.130 +16        2.6622  xen-syms                 context_switch
   1.131 +16        2.6622  xen-syms                 lookup_domain_mpa
   1.132 +7         1.1647  xen-syms                 vcpu_get_domain_bundle
   1.133 +3         0.4992  xen-syms                 do_dom0vp_op
   1.134 +3         0.4992  xen-syms                 lookup_noalloc_domain_pte
   1.135 +3         0.4992  xen-syms                 xencomm_get_page
   1.136 +2         0.3328  xen-syms                 __copy_user
   1.137 +2         0.3328  xen-syms                 vcpu_translate
   1.138 +1         0.1664  xen-syms                 ia64_frametable_probe
   1.139 +1         0.1664  xen-syms                 vcpu_wake
   1.140 +1         0.1664  xen-syms                 xencomm_ctxt_init
   1.141 +
   1.142 +
   1.143 +Limitations
   1.144 +-----------
   1.145 +- Don't create/destroy/save/restore/live migration during xenoprof session.
   1.146 +  Otherwise something would go wrong. (including xen VMM hang)
   1.147 +  This isn't ia64 specific.
   1.148 +  If you want to profile early boot phase, "xm create -p/unpause" is your
   1.149 +  friend.
   1.150 +
   1.151 +- Currently only the generic PMC/PMD is supported.
   1.152 +  The CPU implementation specific PMC/PMD isn't supported.
   1.153 +
   1.154 +- calling graph isn't supported yet.
   1.155 +
   1.156 +- The active domain for HVM domain isn't supported
   1.157 +  Xen/IA64 VMM itself supports it, however the driver doesn't exist.