gcov is a test coverage program. generally used with GCC to analyze programs to help create more efficient, faster running code and to discover untested parts of your program. Software developers also use coverage testing in concert with testsuites, to make sure software is actually good enough for a release Our efforts on the same line added the gcov(gcc) profiling support for hypervisor only. Current code base support xen-3.3.onwards, x86_32 and gcc 3.4 to 4.3. xen-patch: code for hypervisor which populate the gcov_info (gcc 3.4 onward) with data file information, base code is taken from http://ltp.sourceforge.net/coverage/gcov.php. added xen support and a way to interact with linux since hypervisor itself cannot populate the /proc filesystem. linux-patch: code for linux kernel basically enquire the hypervisor part to revert all data file information and populate the /proc/xen/gcov with data and graph file (optional) command-line/modules parameter: 1. xen-gcov-link: if set, it creates the *.c and *.gcno linking under /proc/xen/gcov, else to run gcov/lcov we have to create manually linking. 2. xen-gcov-update: update the data files after xen-gcov-update secs, default value is 5sec... e.g while running a test suite, requires lower value of xen-gcov-update. tunable xen-gcov-update exist at /proc/sys/xen usage: echo <num> >/proc/sys/xen/xen-gcov-update Running lcov straight-a-way could be problematic because lcov is written to see profiling info @/proc/gcov. To accomodate /proc/xen/gcov edit the config file /etc/lcovrc parameter as lcov_gcov_dir = /proc/gcov to /proc/xen/gcov and perform modprobe xen-gcov-proc. We are having patches to accomodate both but changing config file could be a better options. Still if someone need patch please free to mail me @bewith.tej@gmail.com YES, We are aware that gcov profiling is quite basic profiling concept, but its a begning from our end to make xen hypervisor best and robust, in future we will be working on changes required for 64bit hypervisor, older xen versions (if required), PERFMON features of Modern CPU''s. Comments, reports, suggestions, and any other types of feedback is more than welcome -tej & team _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Feb 18, 2009 at 1:36 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 18/02/2009 04:03, "Tej" <bewith.tej@gmail.com> wrote: > >> hey keir >> >> i need some input from you, regarding this tool.. It is worth >> investigating further in hypervisor profiling. >> or anything like this tool need a better design/coding/new features >> anything of this sort. > > Does it get us significantly more than the existing xentrace and xenoprofile > tools? Especially the latter, which already does program-counter tracing and > generation of stats from that, via the oprofile tool.thanks for our feedback i agree xenoprofile is advanced proffiling tool in xen since ages, but GCOV could be useful tool to naive tester/programmer on XEN who really don''t understand xenoprofile stats.... e.g If i start with any hypervisor subsystem (scheduler), i will run xm test suite for scheduler and see what all code is getting affected over a period of time and proceed with it...> > George Dunlap does most of our profiling internally. You might ask him what > he thinks compared with these existing supported tools.George, Do you have any comments on this> > -- Keir > > >thanks -tej _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2009-Feb-19 14:53 UTC
Re: [Xen-devel] [RFC][PATCH] Hypervisor profiling using GCOV
Tej wrote:>> Does it get us significantly more than the existing xentrace and xenoprofile >> tools? Especially the latter, which already does program-counter tracing and >> generation of stats from that, via the oprofile tool. >> > > thanks for our feedback > i agree xenoprofile is advanced proffiling tool in xen since ages, but > GCOV could be useful tool to naive tester/programmer on XEN who really > don''t understand xenoprofile stats.... >Don''t undersell gcov; its purpose is slightly different from either xentrace or xenoprofile. Xentrace can be used to get information about what paths or reasons caused vmexits (as well as just seeing specific patterns that happen). xenoprofile is a relatively low-overhead way of just profiling (which unfortuantely doesn''t work properly in 32-on-64 mode ATM). gcov''s main purpose is to tell you code coverage; profiling is just a side-effect. I looked at the LTP page about lcov, and it looks like it was pretty useful for them. It has graphical output with the number of times / percentage a given path was taken. It probably is worth porting to Xen for the same reason -- to see how well given paths in Xen actually get exercised.> e.g If i start with any hypervisor subsystem (scheduler), i will run > xm test suite for scheduler and see what all code is getting affected > over a period of time and proceed with it... >It sounds like the main problem with xenoprofile is that it''s hard to set up and use ATM: it could use some attention to the code, and some well-worded HOWTOs. The fact that 32-on-64 doesn''t work properly (truncates the long EIPs) doesn''t help. :-) So I think that it probably would be useful. Unfortunately, I don''t have time in the near future to look at either of these (new "xcov" functionality, or fixing xenoprofile). Gianluca''s been doing some interesting work with testing. I''ll ask him if he''s interested in looking at it. Thanks for your work though, Tej! -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Feb 19, 2009 at 8:23 PM, George Dunlap <george.dunlap@eu.citrix.com> wrote:> Tej wrote: >>> >>> Does it get us significantly more than the existing xentrace and >>> xenoprofile >>> tools? Especially the latter, which already does program-counter tracing >>> and >>> generation of stats from that, via the oprofile tool. >>> >> >> thanks for our feedback >> i agree xenoprofile is advanced proffiling tool in xen since ages, but >> GCOV could be useful tool to naive tester/programmer on XEN who really >> don''t understand xenoprofile stats.... >> > > Don''t undersell gcov; its purpose is slightly different from either xentrace > or xenoprofile. Xentrace can be used to get information about what paths or > reasons caused vmexits (as well as just seeing specific patterns that > happen). xenoprofile is a relatively low-overhead way of just profiling > (which unfortuantely doesn''t work properly in 32-on-64 mode ATM). gcov''s > main purpose is to tell you code coverage; profiling is just a side-effect.> > I looked at the LTP page about lcov, and it looks like it was pretty useful > for them. It has graphical output with the number of times / percentage a > given path was taken. It probably is worth porting to Xen for the same > reason -- to see how well given paths in Xen actually get exercised. >> >> e.g If i start with any hypervisor subsystem (scheduler), i will run >> xm test suite for scheduler and see what all code is getting affected >> over a period of time and proceed with it... >> > > It sounds like the main problem with xenoprofile is that it''s hard to set up > and use ATM: it could use some attention to the code, and some well-worded > HOWTOs. The fact that 32-on-64 doesn''t work properly (truncates the long > EIPs) doesn''t help. :-) > > So I think that it probably would be useful. Unfortunately, I don''t have > time in the near future to look at either of these (new "xcov" > functionality, or fixing xenoprofile). Gianluca''s been doing some > interesting work with testing. I''ll ask him if he''s interested in looking > at it.thanks for your valuable feedback.... I need some comments from you or Gianluca regarding the basic design and coding standard, or any other way it can be improved. Patches are mainly to show the design and approach we have followed to produce code coverage. I am planning to change code of lcov to support xen code coverage out of box rather than changing lcov config file. any comments on this? Anyway here are the patches for xen-3.2 and xen-3.1.* in Xen-3.2 previous linux patches will do.> > Thanks for your work though, Tej!thanks -tej> > -George >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel