File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,6 +413,8 @@ cdef class LineProfiler:
413413 func.__code__ = code
414414 except AttributeError as e:
415415 func.__func__.__code__ = code
416+ else : # No re-padding -> no need to update the neighbors
417+ neighbors = {self }
416418 # TODO: Since each line can be many bytecodes, this is kinda
417419 # inefficient
418420 # See if this can be sped up by not needing to iterate over
@@ -446,7 +448,8 @@ cdef class LineProfiler:
446448 code = code.replace(co_filename = cython_source)
447449 neighbors = {self }
448450 # Update `._c_code_map` and `.code_hash_map` with the new line
449- # hashes on `self` and other instances profiling the same func
451+ # hashes on `self` (and other instances profiling the same
452+ # function if we padded the bytecode)
450453 for instance in neighbors:
451454 prof = < LineProfiler> instance
452455 try :
You can’t perform that action at this time.
0 commit comments