| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hi @iritkatriel , this PR basically just make it clearer how the monitoring backend behavior matches the settrace bahavior, while fixing a small bug. Hope it won't be too much work to review :) |
Sorry, something went wrong.
|
Wow that was fast! Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The existing behavior of bdb's monitoring backend does not fully match what sys.settrace does. The update for opcode events is separated from the other local events, which does not quite make sense.
This PR unifies the event handling - update_local_events() will simply check f_trace and f_trace_opcode to decide what events should be enabled for that code object.
This actually cleans up the logic for the monitoring backend.
The check_trace_opcodes() is removed from stop_trace() because clear_id does the work.
There was a small bug in the original code - check_trace_opcodes will actually erase the work check_trace_func does. It did not matter because we always do start_trace() when we start trace and we are only interested in opcode events. However, theoretically it's still wrong. Now it has the correct behavior.
This is not really "user observable", so it should be considered as a refactoring. (However it blocks something I'm working on for async stuff).