[Python-Dev] PEP 578: Python Runtime Audit Hooks (original) (raw)
Inada Naoki songofacandy at gmail.com
Fri Mar 29 23:20:07 EDT 2019
- Previous message (by thread): [Python-Dev] PEP 578: Python Runtime Audit Hooks
- Next message (by thread): [Python-Dev] PEP 578: Python Runtime Audit Hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I don't like adding more Python callback from low level.
Python runtime is very complicated already, especially del, shutdown process, and multi threading. Python callback from low level is source of very difficult bugs always.
Additionally, if we used the PEP for logging complex application, the log will be unreliable. For example:
- Want to open file A in C code, call callback.
- In the callback, "A is opened" is logged.
- In the same callback, import may be happened and logged.
- In the same callback, other thread may be run and any thing can be logged.
- Many many other things happens and callback is called.
- Then, open the file A.
In this example, logged event ordering and timing is very different from real event ordering and timing.
I prefer low level tool to trace low level thing, although it lacks some application context. Maybe, DTrace will become more important tool.
https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/DTrace-on-Windows/ba-p/362902
Regards,
Inada Naoki <songofacandy at gmail.com>
- Previous message (by thread): [Python-Dev] PEP 578: Python Runtime Audit Hooks
- Next message (by thread): [Python-Dev] PEP 578: Python Runtime Audit Hooks
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]