Fix the line-level profile display broken by the MPArch migration

Bug: b/41495799
Change-Id: Ieb6fe858599f3be1f8fdd100c21a717206de0e3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5368457
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
diff --git a/front_end/panels/timeline/TimelinePanel.ts b/front_end/panels/timeline/TimelinePanel.ts
index 98e5bf1..7ad0999 100644
--- a/front_end/panels/timeline/TimelinePanel.ts
+++ b/front_end/panels/timeline/TimelinePanel.ts
@@ -1202,7 +1202,7 @@
     // Set up line level profiling with CPU profiles, if we found any.
     PerfUI.LineLevelProfile.Performance.instance().reset();
     if (traceParsedData && traceParsedData.Samples.profilesInProcess.size) {
-      const rootTarget = SDK.TargetManager.TargetManager.instance().rootTarget();
+      const primaryPageTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
       // Gather up all CPU Profiles we found when parsing this trace.
       const cpuProfiles =
           Array.from(traceParsedData.Samples.profilesInProcess).flatMap(([_processId, threadsInProcess]) => {
@@ -1210,7 +1210,7 @@
             return profiles;
           });
       for (const profile of cpuProfiles) {
-        PerfUI.LineLevelProfile.Performance.instance().appendCPUProfile(profile, rootTarget);
+        PerfUI.LineLevelProfile.Performance.instance().appendCPUProfile(profile, primaryPageTarget);
       }
     }