profiling active RHEL 4 PV domains with xenoprof
Hi,
Is it necessary to run a xenoprof-patched oprofile in a PV domU being actively profiled? I ask because
http://xenoprof.sourceforge.net/xenoprof_2.0.txt
seems to say no (no mention of --xen switch) but
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf
seems to say yes (specifies use of --xen in domUs). I'm running RHEL 4 in the domU I want to actively profile, and RHEL 4 provides the ancient oprofile-0.8.1 package, with no support for the --xen switch. I've gotten oprofile 0.9.6 with xenoprof patches built on RHEL 4 but haven't been able to test it due to XENOPROF_start failing (see other message).
Another thing I'm confused about: the above xenoprof tutorial also specifies use of the --event switch in domUs, saying they must use the same event as dom0. Makes sense, but my domUs are PV, and oprofile says only timer interrupts are usable. So must I also use timer interrupts on dom0?
thanks,
-Andrew
It's been a long time since I played with oprofile; I think it could use some serious attention, but it's been on my "list of important things to do someday" for about 2 years now. :-)
Re the PV kernels: are you sure that the PV kernel has support for Xen profiling? PV xenoprofile makes hypercalls to Xen to set up the performance event counters. But if that isn't set up properly, or for some other reason doesn't work right, the guest oprofile may default back to using only timers, for which it doesn't need Xen's help (but which are less accurate especially in a virtual environment).
-George
Quoted 33 lines · Andrew Evans
Hi,
Is it necessary to run a xenoprof-patched oprofile in a PV domU being actively profiled? I ask because
http://xenoprof.sourceforge.net/xenoprof_2.0.txt
seems to say no (no mention of --xen switch) but
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf
seems to say yes (specifies use of --xen in domUs). I'm running RHEL 4 in the domU I want to actively profile, and RHEL 4 provides the ancient oprofile-0.8.1 package, with no support for the --xen switch. I've gotten oprofile 0.9.6 with xenoprof patches built on RHEL 4 but haven't been able to test it due to
XENOPROF_startfailing (see other message).Another thing I'm confused about: the above xenoprof tutorial also specifies use of the --event switch in domUs, saying they must use the same event as dom0. Makes sense, but my domUs are PV, and oprofile says only timer interrupts are usable. So must I also use timer interrupts on dom0?
thanks,
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Evans
Sent: Thursday, January 28, 2010 5:38 PM
To: [email protected]
Subject: [Xen-devel] profiling active RHEL 4 PV domains with xenoprof
Quoted 4 lines
Hi,
Is it necessary to run a xenoprof-patched oprofile in a PV domU being actively profiled? I ask because
Yes, you need need xenoprof support both in the kernel and in the OProfile user level tools in anctive profiled domain.
Quoted 5 lines
http://xenoprof.sourceforge.net/xenoprof_2.0.txt
seems to say no (no mention of --xen switch) but
Quoted 7 lines
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf
seems to say yes (specifies use of --xen in domUs). I'm running RHEL 4 in the domU I want to actively profile, and RHEL 4 provides the ancient
oprofile-0.8.1 package, with no support for the --xen switch. I've gotten oprofile 0.9.6 with xenoprof patches built on
Are you sure Oprofile user level tools has xenoprof support?
The latest patch avaialable in http://xenoprof.sourceforge.net/ is for oprofile 0.9.5 but you claim to be using 0.9.6 Try using 0.9.5 and apply the patch.
Quoted 10 lines
RHEL 4 but haven't been able to test it due to
XENOPROF_startfailing (see other message).Another thing I'm confused about: the above xenoprof tutorial also specifies use of the --event switch in domUs, saying they must use the same event as dom0. Makes sense, but my domUs are PV, and oprofile says only timer interrupts are usable. So must I also use timer interrupts on dom0?
No, you should use the same event in dom0 and domU and not timer mode.
If Oprofile is reporting timer mode in domU there is something wrong in its OProfile configuration; either you don't have the right patches or you are not correctly synchronyzing dom0 and domU opcontrol commands.
Renato
Quoted 10 lines
thanks,
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I didn't test active profiling much, because I was interested in profiling only the guest kernel. It could be the patches. I will take a look and get back.
-dulloor
Quoted 66 lines · Jose Renato G
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Evans
Sent: Thursday, January 28, 2010 5:38 PM
To: [email protected]
Subject: [Xen-devel] profiling active RHEL 4 PV domains with xenoprofQuoted 4 lines
Hi,
Is it necessary to run a xenoprof-patched oprofile in a PV domU being actively profiled? I ask because
Yes, you need need xenoprof support both in the kernel and in the OProfile user level tools in anctive profiled domain.
Quoted 5 lines
http://xenoprof.sourceforge.net/xenoprof_2.0.txt
seems to say no (no mention of --xen switch) but
Quoted 7 lines
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf
seems to say yes (specifies use of --xen in domUs). I'm running RHEL 4 in the domU I want to actively profile, and RHEL 4 provides the ancient
oprofile-0.8.1 package, with no support for the --xen switch. I've gotten oprofile 0.9.6 with xenoprof patches built onAre you sure Oprofile user level tools has xenoprof support?
The latest patch avaialable in http://xenoprof.sourceforge.net/ is for oprofile 0.9.5 but you claim to be using 0.9.6 Try using 0.9.5 and apply the patch.Quoted 10 lines
RHEL 4 but haven't been able to test it due to
XENOPROF_startfailing (see other message).Another thing I'm confused about: the above xenoprof tutorial also specifies use of the --event switch in domUs, saying they must use the same event as dom0. Makes sense, but my domUs are PV, and oprofile says only timer interrupts are usable. So must I also use timer interrupts on dom0?
No, you should use the same event in dom0 and domU and not timer mode.
If Oprofile is reporting timer mode in domU there is something wrong in its OProfile configuration; either you don't have the right patches or you are not correctly synchronyzing dom0 and domU opcontrol commands.Renato
Quoted 10 lines
thanks,
-Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Jose Renato G
Yes, you need need xenoprof support both in the kernel and in the OProfile user level tools in anctive profiled domain.
Thanks for clarifying.
Quoted 4 lines
Are you sure Oprofile user level tools has xenoprof support?
The latest patch avaialable in http://xenoprof.sourceforge.net/ is for oprofile 0.9.5 but you claim to be using 0.9.6 Try using 0.9.5 and apply the patch.
Upstream OProfile 0.9.6 doesn't include xenoprof support. What I did was fix the xenoprof patch for 0.9.5 so it applies cleanly to 0.9.6. The changes were trivial and only affected the usage message in opcontrol IIRC. I'll attach it so you can put it up for download. OProfile 0.9.5 has some fairly serious bugs that 0.9.6 has fixed, so that's why I'm using 0.9.6.
Quoted 3 lines
No, you should use the same event in dom0 and domU and not timer mode.
If Oprofile is reporting timer mode in domU there is something wrong in its OProfile configuration; either you don't have the right patches or you are not correctly synchronyzing dom0 and domU opcontrol commands.
Ok, I'll check my OProfile configuration. Thanks very much.
-Andrew
agents/jvmpi/.deps/libjvmpi_oprofile_la-jvmpi_oprofile.Plo +1 -0
@@ -0,0 +1 @@ +# dummy
agents/jvmpi/Makefile +521 -0
521 lines not on this page · raw message
agents/jvmti/.deps/libjvmti_oprofile_la-libjvmti_oprofile.Plo +1 -0
@@ -0,0 +1 @@ +# dummy
agents/jvmti/Makefile +522 -0
522 lines not on this page · raw message
agents/Makefile +546 -0
546 lines not on this page · raw message
config.h +105 -0
105 lines not on this page · raw message
config.log +2009 -0
1,304 lines not on this page · raw message
config.status +1311 -0
1,311 lines not on this page · raw message
daemon/liblegacy/.deps/opd_parse_proc.Po +1 -0
Lines of this file are not shown. View the raw message.
daemon/liblegacy/.deps/opd_sample_files.Po +1 -0
Lines of this file are not shown. View the raw message.
daemon/liblegacy/Makefile +510 -0
510 lines not on this page · raw message
daemon/Makefile +686 -0
686 lines not on this page · raw message
daemon/opd_kernel.c +180 -6
186 lines not on this page · raw message
daemon/opd_trans.c +33 -8
41 lines not on this page · raw message
doc/Makefile +555 -0
555 lines not on this page · raw message
doc/opannotate.1 +119 -0
119 lines not on this page · raw message
doc/oparchive.1 +76 -0
76 lines not on this page · raw message
doc/opcontrol.1 +206 -0
206 lines not on this page · raw message
doc/opgprof.1 +67 -0
67 lines not on this page · raw message
doc/ophelp.1 +58 -0
58 lines not on this page · raw message
doc/opimport.1 +59 -0
59 lines not on this page · raw message
doc/opreport.1 +140 -0
140 lines not on this page · raw message
doc/srcdoc/Doxyfile +184 -0
184 lines not on this page · raw message
events/Makefile +450 -0
450 lines not on this page · raw message
gui/Makefile +669 -0
669 lines not on this page · raw message
gui/ui/Makefile +493 -0
493 lines not on this page · raw message
libabi/Makefile +677 -0
677 lines not on this page · raw message
libabi/tests/Makefile +492 -0
492 lines not on this page · raw message
libdb/Makefile +603 -0
603 lines not on this page · raw message
libdb/tests/Makefile +556 -0
556 lines not on this page · raw message
libop/.deps/op_alloc_counter.Po +87 -0
87 lines not on this page · raw message
libop/.deps/op_config.Po +100 -0
100 lines not on this page · raw message
libop/.deps/op_cpu_type.Po +81 -0
81 lines not on this page · raw message
libop/.deps/op_events.Po +105 -0
105 lines not on this page · raw message
libop/.deps/op_get_interface.Po +81 -0
81 lines not on this page · raw message
libop/.deps/op_mangle.Po +92 -0
92 lines not on this page · raw message
libop/.deps/op_parse_event.Po +81 -0
81 lines not on this page · raw message
libop/.deps/op_xml_events.Po +83 -0
83 lines not on this page · raw message
libop/.deps/op_xml_out.Po +78 -0
78 lines not on this page · raw message
libop/libop.a +93 -0
93 lines not on this page · raw message
libop/Makefile +623 -0
623 lines not on this page · raw message
libop/tests/.deps/alloc_counter_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libop/tests/.deps/load_events_files_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libop/tests/Makefile +601 -0
601 lines not on this page · raw message
libopagent/.deps/libopagent_la-opagent.Plo +144 -0
144 lines not on this page · raw message
libopagent/.libs/libopagent_la-opagent.o +17 -0
Lines of this file are not shown. View the raw message.
libopagent/Makefile +556 -0
556 lines not on this page · raw message
libopt++/Makefile +484 -0
484 lines not on this page · raw message
libpp/Makefile +565 -0
565 lines not on this page · raw message
libregex/Makefile +641 -0
641 lines not on this page · raw message
libregex/stl.pat +160 -0
160 lines not on this page · raw message
libregex/tests/Makefile +574 -0
574 lines not on this page · raw message
libregex/tests/mangled-name +453 -0
453 lines not on this page · raw message
libtool +7613 -0
7,613 lines not on this page · raw message
libutil/.deps/op_cpufreq.Po +78 -0
78 lines not on this page · raw message
libutil/.deps/op_deviceio.Po +107 -0
107 lines not on this page · raw message
libutil/.deps/op_fileio.Po +111 -0
111 lines not on this page · raw message
libutil/.deps/op_file.Po +146 -0
146 lines not on this page · raw message
libutil/.deps/op_growable_buffer.Po +68 -0
68 lines not on this page · raw message
libutil/.deps/op_lockfile.Po +113 -0
113 lines not on this page · raw message
libutil/.deps/op_popt.Po +87 -0
87 lines not on this page · raw message
libutil/.deps/op_version.Po +79 -0
79 lines not on this page · raw message
libutil/libutil.a +53 -0
53 lines not on this page · raw message
libutil/Makefile +627 -0
627 lines not on this page · raw message
libutil/tests/Makefile +563 -0
563 lines not on this page · raw message
libutil++/Makefile +653 -0
653 lines not on this page · raw message
libutil++/tests/.deps/cached_value_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/comma_list_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/file_manip_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/glob_filter_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/path_filter_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/string_filter_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/.deps/string_manip_tests.Po +1 -0
Lines of this file are not shown. View the raw message.
libutil++/tests/Makefile +632 -0
632 lines not on this page · raw message
m4/Makefile +387 -0
387 lines not on this page · raw message
Makefile +787 -0
787 lines not on this page · raw message
opjitconv/Makefile +522 -0
522 lines not on this page · raw message
pp/Makefile +584 -0
584 lines not on this page · raw message
utils/Makefile +529 -0
529 lines not on this page · raw message
utils/opcontrol +128 -6
134 lines not on this page · raw message
utils/opcontrol~ +2135 -0
2,135 lines not on this page · raw message
utils/opcontrol.orig +2020 -0
2,020 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Part of the diff is not shown here. View the raw message.
Quoted 7 lines · George Dunlap
Re the PV kernels: are you sure that the PV kernel has support for Xen profiling? PV xenoprofile makes hypercalls to Xen to set up the performance event counters. But if that isn't set up properly, or for some other reason doesn't work right, the guest oprofile may default back to using only timers, for which it doesn't need Xen's help (but which are less accurate especially in a virtual environment).
I'm pretty sure RHEL 4's 2.6.9 kernel doesn't have the xenoprof patches, but I haven't looked yet. I'm going to try the 2.6.18 xenU kernel I built from the xen-unstable tree and see how that goes.
thanks,
-Andrew
Quoted 4 lines · Dulloor
I didn't test active profiling much, because I was interested in profiling only the guest kernel. It could be the patches. I will take a look and get back.
Thanks! Don't spend much time on it yet though. I'm pretty sure my PV guest kernel didn't have the xenoprof patches (RHEL 4 2.6.9-67.ELxenU). I'm going to try the 2.6.18 xenU kernel I built from xen-unstable and see how that goes.
-Andrew
Big thanks to Renato and George -- I now have OProfile working for active PV domains. The key was that my guest kernel didn't have the xenoprof patches. I built the 2.6.18-xenU kernel/modules from xen-unstable and pushed those to my domU. I had to make menuconfig to set CONFIG_PROFILING=y and CONFIG_OPROFILE=m after doing the make KERNELS=linux-2.6-xenU kernels from the top of my xen-unstable.hg tree. I also had to mkinitrd again to create a ramdisk compatible with the new kernel.
Now opreport -l in dom0 shows output like this:
CPU: Core 2, speed 2500.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 1000000
samples % app name symbol name 219 12.1734 vmlinux-unknown (no symbols) 158 8.7827 e1000e (no symbols) 115 6.3924 vmlinux .text.read_sb_page 94 5.2251 xen-unknown (no symbols) 72 4.0022 libpython2.4.so.1.0 (no symbols) 49 2.7237 vmlinux xfrm_state_find 44 2.4458 vmlinux .text.md_ioctl 37 2.0567 bridge (no symbols) 34 1.8899 netbk (no symbols)
I'm running a different kernel in the domU to the one in my dom0, and it doesn't appear to be possible to pass multiple vmlinux paths to opcontrol. Renato's
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf uses the same kernel in dom0 and domU. Is that a requirement, or is there a way for me to point oprofiled or opreport to my guest kernel's debug symbols too?
thanks,
-Andrew
Quoted 10 lines
-----Original Message-----
From: Andrew Evans [mailto:[email protected]]
Sent: Friday, January 29, 2010 4:24 PM
To: [email protected]
Cc: Santos, Jose Renato G; George Dunlap
Subject: Re: [Xen-devel] profiling active RHEL 4 PV domains with xenoprof
Quoted 8 lines
I'm running a different kernel in the domU to the one in my dom0, and it doesn't appear to be possible to pass multiple vmlinux paths to opcontrol. Renato's
http://www.xen.org/files/summit_3/xenoprof_tutorial.pdf uses the same kernel in dom0 and domU. Is that a requirement, or is there a way for me to point oprofiled or opreport to my guest kernel's debug symbols too?
You can use different kernels for different domains.
Each active domain should specify its own kernel image using the --vmlinux option in the opcontrol command.
That means you need to have the image available in the domain file system (normally this is not required as the guest image is loaded from dom0 file system)
Also remember that the samples from a domU guest will not be reported in dom0. You need to run opreport in each guest to obtain their samples.
Renato
Quoted 5 lines
thanks,
-Andrew
Quoted 2 lines · Jose Renato G
Also remember that the samples from a domU guest will not be reported in dom0. You need to run opreport in each guest to obtain their samples.
Thanks, that's what I was missing. I thought domU samples were automagically propagated up to dom0 somehow, since the examples I've seen didn't say anything about running opreport in domUs that have been actively profiled.
thanks,
-Andrew