Bug 1668867 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

* LuL initialization
  - [LuL is initialized here in the SamplerThread](https://searchfox.org/mozilla-central/source/tools/profiler/core/platform-linux-android.cpp#414)
  - [SamplerThread is created in ActivePS.](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#821)
  - [ActivePS is created in locked_profiler_start.](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#4485)
  - 
* Child processes are notified
  - [IPC call](https://searchfox.org/mozilla-central/source/tools/profiler/gecko/ProfilerParent.cpp#685)
  - [NotifyProfilerStarted](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#3888)
  - `NotifyProfilerStarted(capacity, duration, interval, features, filters.begin(), // found in profiler_init`
  - `NotifyProfilerStarted(aCapacity, aDuration, aInterval, aFeatures, aFilters, // found in profiler_start`
  - `NotifyProfilerStarted(aCapacity, aDuration, aInterval, aFeatures, aFilters, // found in profiler_ensure_started`

So ultimately, the ordering of operations is:
* profiler_start
 * locked_profiler_start
  - ActivePS
  - SamplerThread
  - LUL
 * NotifyProfilerStarted
  -  ProfilerParent::ProfilerStarted
* LuL initialization
  - [LuL is initialized here in the SamplerThread](https://searchfox.org/mozilla-central/source/tools/profiler/core/platform-linux-android.cpp#414)
  - [SamplerThread is created in ActivePS.](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#821)
  - [ActivePS is created in locked_profiler_start.](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#4485)
  - 
* Child processes are notified
  - [IPC call](https://searchfox.org/mozilla-central/source/tools/profiler/gecko/ProfilerParent.cpp#685)
  - [NotifyProfilerStarted](https://searchfox.org/mozilla-central/rev/7ef5cefd0468b8f509efe38e0212de2398f4c8b3/tools/profiler/core/platform.cpp#3888)
  - `NotifyProfilerStarted(capacity, duration, interval, features, filters.begin(), // found in profiler_init`
  - `NotifyProfilerStarted(aCapacity, aDuration, aInterval, aFeatures, aFilters, // found in profiler_start`
  - `NotifyProfilerStarted(aCapacity, aDuration, aInterval, aFeatures, aFilters, // found in profiler_ensure_started`

So ultimately, the ordering of operations is:
* profiler_start
  * locked_profiler_start
    - ActivePS
    - SamplerThread
    - LUL
  * NotifyProfilerStarted
    -  ProfilerParent::ProfilerStarted

Back to Bug 1668867 Comment 6