Hypervisor profiling using GCOV

From Tej Bewith on xen-devel:
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

Read more

Welcome Honda to the Xen Project Board
12/09/2024

We're excited to announce our newest Advisory Board Member Honda, to Xen Project. Since its foundation, Honda has been committed to "creating a society that is useful to people" by utilizing its technologies and ideas. Honda also focuses on environmental responsiveness and traffic safety, and continue

Say hello to our new website
12/05/2024

Hello Xen Community, You may have noticed something different... We've refreshed our existing website! Why did we do this? Well, all these new changes are part of an ongoing effort to increase our visibility and make it easier to find information on pages. We know how important it

Xen Project Announces Performance and Security Advancements with Release of 4.19
08/05/2024

New release marks significant enhancements in performance, security, and versatility across various architectures.  SAN FRANCISCO – July 31st, 2024 – The Xen Project, an open source project under the Linux Foundation, is proud to announce the release of Xen Project 4.19. This release marks a significant milestone in enhancing performance, security,

Upcoming Closure of Xen Project Colo Facility
07/10/2024

Dear Xen Community, We regret to inform you that the Xen Project is currently experiencing unexpected changes due to the sudden shutdown of our colocated (colo) data center facility by Synoptek. This incident is beyond our control and will impact the continuity of OSSTest (the gating Xen Project CI loop)