It would seem quite intuitive for the performance profiler of Chrome to respect whatever the currently selected frame is from within the console drawer, for example. Firefox here handles this much more on the user-friendly and intuitive side.
In Chrome, it's likely a by-product of the way in which the performance profiler operates against the default "active" frame, favoring the top-level window unless manually forwarded. Annoyingly, Chrome doesn't seem to automatically adjust itself when a context is selected from within the console drawer for performance profiling.
A few points and some possible explanations behind this design decision follow.
Historical Design Choices: Chrome DevTools was initially built with a focus on the top-level document for profiling. Explicitly profiling iframes likely required additional mechanisms to isolate and record data from nested frames.
Cross-Origin Security Concerns: Profiling of nested iframes, especially cross-origin ones, is complex due to the browser security models. Chrome may default to the top-level window intentionally to avoid accidentally violating security boundaries or accessing data that is restricted.
Resource Management: Profiling deeply nested or multiple iframes could be quite resource-intensive for the browser. By defaulting to the top-level frame, Chrome avoids the risk of capturing excessive, irrelevant data when the user isn't explicitly targeting an iframe.
Given the obvious advantages of Firefox's behavior, Chrome's DevTools team may fix this inconsistency at some point in the future. You can help make that by create a pull request in the Chrome DevTools GitHub repository.
Isolate the iframe: Open the iframe in a new tab or use "Inspect Frame" to open a DevTools session specifically for the iframe. This will force Chrome to focus only on that frame when it profiles.
Use Firefox: If you need to profile nested frames as an integral part of your workflow, and you want a smoother experience, then Firefox's performance profiler may be a better tool for you.
Third-Party Tools: For more complicated iframe configurations, consider third-party utilities like Lighthouse or running custom Puppeteer scripts.