I apologize for asking for help on such an outdated version of Xen. I would like to understand why xencov read always returns the same dat file as shown in the attached file.
I followed this guide https://wiki.xenproject.org/index.php?title=Compiling_Xen_From_Source&oldid=17237 (14 September 2016 version) to compile Xen from source and this guide to enable coverage support https://xenbits.xen.org/docs/4.8-testing/misc/coverage.html.
I also applied this patch https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg03353.html because I had some compilation errors.
Everything went fine until I used xencov read. The result is always the same (4 bytes returned, always .CTX) but the file is malformed because xencov_split cannot read that.
I am using Ubuntu 14.04. I made sure to enable test coverage support under xen/Config.mk and gcov under tools/qemu-xen/configure. I checked the compilation logs and every file was instrumented with the -ftest-coverage option.