When using real-time profiling, the signal is delivered (via broadcasting from the main thread) to the thread that called vmprof.enable(). To register additional threads, we can call insert_real_time_thread.
Currently, this function must be called from each thread that wants to be profiled, and then pthread_self is used to get the caller's thread ID.
Can we add an optional argument to the insert_real_time_thread function that allows registering a different thread by passing its id? This would be convenient in situations where it is difficult to get the desired thread to register itself. For example, we would like to be able to register the worker thread of a web server from a separate control interface.
This change would be backwards compatible, since by default (not passing the argument), the current thread ID would still be used.
When using real-time profiling, the signal is delivered (via broadcasting from the main thread) to the thread that called
vmprof.enable()
. To register additional threads, we can callinsert_real_time_thread
.Currently, this function must be called from each thread that wants to be profiled, and then
pthread_self
is used to get the caller's thread ID.Can we add an optional argument to the
insert_real_time_thread
function that allows registering a different thread by passing its id? This would be convenient in situations where it is difficult to get the desired thread to register itself. For example, we would like to be able to register the worker thread of a web server from a separate control interface.This change would be backwards compatible, since by default (not passing the argument), the current thread ID would still be used.