I think the cause for the delay is the following: When the profiler is started for the first time, each process needs to initialize the stackwalker; on arm64 that's LuL which takes a long time to initialize (bug 1635810). However, we don't parallelize the initialization between the processes. Instead, we first initialize in the parent process, and *then* we tell the content processes to start profiling, which will then initialize there. The parent process initialization happens synchronously during the StartProfiler call, I think (but I'm not 100% sure). I think we could improve the situation a little bit by telling the other processes to start profiling before we initialize the profiler in the parent process.
Bug 1668867 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I think the cause for the delay is the following: When the profiler is started for the first time, each process needs to initialize the stackwalker; on arm64 that's LuL which takes a long time to initialize (bug 1635810). However, we don't parallelize the initialization between the processes. Instead, we first initialize in the parent process, and *then* we tell the content processes to start profiling, which will then initialize there. The parent process initialization happens synchronously during the StartProfiler call, I think (but I'm not 100% sure). I think we could improve the situation a little bit by telling the other processes to start profiling before we initialize the profiler in the parent process - that way, the LuL initialization will happen in parallel.
I think the cause for the delay is the following: When the profiler is started for the first time, each process needs to initialize the stackwalker; on arm64 that's LuL which takes a long time to initialize (bug 1635810). However, we don't parallelize the initialization between the processes. Instead, we first initialize in the parent process, and *then* we tell the content processes to start profiling, which will then initialize. The parent process initialization happens synchronously during the StartProfiler call, I think (but I'm not 100% sure). I think we could improve the situation a little bit by telling the other processes to start profiling before we initialize the profiler in the parent process - that way, the LuL initialization will happen in parallel.