I am profiling my program with python -m cProfile script.py
.
I am using multiprocessing and it seems that the program is taking a lot of time accessing thread lock variables, because the top of cProfile is:
method 'acquire' of '_thread.lock' objects
How can I know in the code where those specific accesses happened?