Actions
Bug #17302
closedThe TracePoint API does not allow setting multiple line traces within the same method (ISEQ)
Description
While setting a tracepoint for a line for the second time within a method, the first one turns off.
I believe this is because the encoded_iseq_trace_instrument
function resets the trace value of an instruction rather than just turning it on if needed: https://github.com/ruby/ruby/blob/799253dc46e96518687dcd4fdca42582251ccffe/iseq.c#L3178
And it is unconditionally called, not limited to the correct line: https://github.com/ruby/ruby/blob/799253dc46e96518687dcd4fdca42582251ccffe/iseq.c#L3219
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0