pub fn register_thread(pid: Option<usize>, sort_index: Option<usize>)
Registers the current thread with the global profiler.