Bytecode generation, Source code mappings, JCov, Future

Alex Rau alex at
Sat Apr 19 04:27:08 PDT 2008

On 17.04.2008, at 02:14, Jonathan Gibbons wrote:

> The code for getting line and offset from character number is in  
> javac, in util/
>> So in case the usefulness of properly tracing above mentioned  
>> information is common sense - what would be the best way ? Here  
>> some aspects:
>> - interleaved output with byte code vs. separate output (file)  
>> interface
>> - replace/reuse/adapt jcov code vs. keep jcov as it is and  
>> implement new stuff from scratch in parallel (compatibility?)
>> - absolute file offsets as you mentioned vs. something else ?
> It would be interesting to get some jcov folk in the discussion to  
> discuss the merits of making jcov available and using that as a  
> basis for work, compared to starting over.

Sounds good.

In the meanwhile I've added some code for writing the information  
into separate files (let's call it trace file). One trace file per  
class right beside them. What kind of format would be appropriate ?  
I'm currently working towards a 3 int record based ascii encoded file  
(human-readable, lightweight) with fields (trace id, source position,  
end position). The instruction trace id is used in the byte code by a  
new attribute called "traceid" as well (guess this setup is what John  
meant with token serial numbers - if not please correct me). That  
seems to me to be the most simple approach for getting first results  
which can be discussed then.

Unfortunately I'm struggling with the IDE setup (new to netbeans,  
long-time eclipse coder). Debugging a unit test from netbeans  
(without ant invocation - most often getting unresolved ant  
properties) is a black hole for me right now :S In case someone has a  
hint on how to do that just send me a private email.

Best regards and enjoy your weekend,


More information about the compiler-dev mailing list