Bottleneck identification and acceleration in multithreaded applications