cvs77 / jchord

Automatically exported from code.google.com/p/jchord
1 stars 2 forks source link

incorrect semantics of present() method in InstrScheme.EventFormat #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This method returns true iff size of event is > 0, which is incorrect: a 
client might want the event without wanting any of its fields (like loc, obj, 
thr, baseobj, fld, etc.) in which case its size will be 0 but the event will 
still be present.  Right now this is fine since none of the clients we have 
asks for an event without also asking for at least one of its fields, so this 
is a low-priority bug. 

Original issue reported on code.google.com by mayur.naik on 14 Mar 2010 at 8:09

GoogleCodeExporter commented 9 years ago
Fixed in r668.  The most critical change lies in the handling of 
NewAndNewArrayEvent: 
the hId, tId, and oId fields can be set or unset independently.  If the oId 
field is 
set, then BefNewEvent and AftNewEvent are instrumented before and after "new" 
allocation sites, with fields hId, tId, and oId, even if the instrumentation 
scheme 
does not set hId and tId.  These two fields are required to match BefNewEvent 
and 
AftNewEvent in TraceTransformer.  The dynamic analysis operating on the final 
transformed trace, however, sees fields hId and tId of NewEvent and 
NewArrayEvent only 
if the instrumentation scheme sets those fields.

Original comment by mayur.naik on 20 Mar 2010 at 5:31