dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Code coverage analysis


From: Rhys Weatherley
Subject: Re: [DotGNU]Code coverage analysis
Date: Mon, 6 Jan 2003 07:01:59 +1000
User-agent: KMail/1.4.3

On Sunday 05 January 2003 10:02 pm, Adam Treat wrote:

> http://www.nexus.hu/vargaz2/
> http://www.bullseye.com/coverage.html
>
> The program uses a manual patch to the Mono jit to perform the work.  I was
> wondering if pnet could use a program such as this?  If so, could it be
> implemented without a patch to ilrun/cscc or how might this be
> accomplished?

Certainly seems useful.  It would probably be necessary to modify ilrun to 
support this.  The logic in "coverage.c" should be pretty straight-forward to 
port, as will be the command-line handling.

The important bit is collecting the line count information.  In the mono 
version, the JIT inserts increment operations at each source line point to 
update the line counts.  This could be achieved in pnet by adding a 
COP_PREFIX_COVERAGE instruction at every source line point.  The argument to 
this instruction would be the address of the coverage variable to increment.  
Look at ILCoderMarkBytecode for some ideas on how extra debug instructions 
can be inserted into the CVM opcode stream.

If someone wants to play with this, then that would be great.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]