--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jyDoc2r4-JyZtSUKqPvhnTG%3D3TkC6wF%3D%3DqPXRuZH9TUTw%40mail.gmail.com.
I don't think changing ScopedPagePauser from process-wide to page or frame specific is a viable option. There could be other pages in the same BrowsingContextGroup and process (e.g., a same-origin opener) which must also be paused, or else the opener can interact with a page that is stuck on a breakpoint.
In Blink terms, I think this means it would need to be PageGroup-wide, which is the representation of a BrowsingContextGroup in a given process. (In browser process terms, DevTools could probably allow a different BrowsingInstance in the same renderer process to keep running during a breakpoint.)
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_QSs6Yup1CqW1BvN6aBXx6PLVUh%2BqZZebZMQWjYGmTDBw%40mail.gmail.com.
Would it be hard for Blink to get a set of Pages in the same BrowsingContextGroup? Let's call it a PageGroup.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jy9yRGAgQNUzuqZ_Gd8YrSEX3VChyn488XBpht24rHkFw%40mail.gmail.com.
I don't think you want to use SiteInstanceGroup or AgentSchedulingGroup for any of this-- both of those can be tuned and change their behavior over time, as haraken@ notes. SiteInstance is also not the right granularity-- DevTools needs to pause everything in the Browsing Context Group in a given process, not just the SiteInstance.
So, we should be aiming to pause all pages with the same BrowsingContextGroupToken(), which I understand to be the pages in blink::Page::RelatedPages().
--
I don't think you want to use SiteInstanceGroup or AgentSchedulingGroup for any of this-- both of those can be tuned and change their behavior over time, as haraken@ notes. SiteInstance is also not the right granularity-- DevTools needs to pause everything in the Browsing Context Group in a given process, not just the SiteInstance.SiteInstance defines a group of documents that are scriptable with each other. Would you help me understand why DevTools needs to pause things that are not scriptable from the main frame?If DevTools pauses everything in the BrowsingContextGroup, I was concerned that it will lead to a non-deterministic behavior. Imagine you have A(B). A is the main frame from a.com and B is a subframe from b.com. A and B have different SiteInstances. A and B are in the same BrowsingContextGroup. A and B may belong to a different renderer process depending on the performance policy.If DevTools pauses only the SiteInstance of A, A is paused and B is not paused. This is deterministic.DevTools pauses everything in the BrowsingContextGroup, A is paused and B may or may not be paused depending on whether A and B belong to the same renderer process or not. This is non-deterministic.Am I missing something...?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jx%3DicUoxiXqgEPzg-kgvH4LvZCQShdcEmjQAAK%2BPUgAew%40mail.gmail.com.
So both may result in broken behaviors. The right solution is to move the tasks to the per-frame schedulers maybe?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jwaa-fG%3DTCT34z0R2HV4VtM%3Dd1GNaodJif1eeLtLdiR_w%40mail.gmail.com.
So I chatted with domfarolino@ and haraken@ today.I explained that the AgentGroupScheduler has a default task runner and the main thread is currently caused by the PauseHandle. Switching to the group of related pages and removing the pause handle is dangerous. If we do not pause the AgentGroupScheduler we are going to run into a number of issues with IPCs and other tasks running inside the group of related pages that should be paused.The current thinking is that we should continue working on MBI in order to unblock ProcessPerSite and Cooperative Scheduling, with ProcessPerSite having higher priority.I explained that we still have some legacy IPC mechanisms that still exist that must be removed:1) GIN java bridge IPC (Android only, no impact on ProcessPerSite)
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAHgVhZW0OcKkOtQ_6mTE58Q%2Bkty%2BJThB_KuNWg2eVOtVNEWOGQ%40mail.gmail.com.
Thanks Dave!Just to clarify, I'm curious to understand the work needed to create one V8 isolate per AgentSchedulingGroup while hosting all V8 isolates on the (one) main thread (i.e., I'm not (yet) talking about multiple main threads) :)On Fri, Oct 13, 2023 at 12:07 PM Dave Tapuska <dtap...@chromium.org> wrote:I'll try to prepare a list of things. I believe there were some spreadsheets that had looked at static locals that needed to move to per isolate data. The isolate is very available so this likely isn't difficult.The main thing I'm working on now rewriting the ipc channel for extensions. Once we do this then we won't have an iteration across all v8::contexts per thread. I hope that this will only take a couple more weeks, I have is mostly all prototyped but have to land it.I told Kouhei when he was visiting Waterloo it would be nice if we had a switch for devtools like Safari (and Android (adb)) does. Then the majority of our customers could have process per site if we had devtools disabled. But I guess that goes against Chrome being easy for developers.DaveOn Thu, Oct 12, 2023, 10:47 PM Kentaro Hara <har...@chromium.org> wrote:HiProcessPerSite is currently causing some issues with DevTools. If DevTools sets a breakpoint in one tab, DevTools cannot be attached to another tab hosted by the same process (i.e., we cannot support cases where DevTools is attached in a nested message loop). This is because ProcessPerSite creates only one V8 isolate.Currently we are working on a mitigation plan (and my hope is that we can go with the plan but it requires a product decision) but I'm curious about this question: How much work will be needed to support multiple V8 isolates? More specifically, how much work will be needed to create one V8 isolate per AgentSchedulingGroup?@Dave Tapuska is removing the usage of v8::Isolate::GetCurrent() from the codebase and we are close to completion (thanks!). My understanding is that this is not enough to create multiple V8 isolates. The biggest challenge is to implement memory isolation for Oilpan. Since Oilpan runs on a per-isolate basis, we need to ban Persistent / Member handles crossing the isolate boundary. We need to replace them with CrossThreadHandle or something else, which will require a lot of engineering work.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jwx1MmOGEMOHpM%3DB3%3Dmk94CcxDY6gOjmEbUvrO0%3DQC18A%40mail.gmail.com.
Benedikt Meurer
Chrome DevTools Manager
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
I might want to add that regardless of whether we do ProcessPerSite or not, once MBI is complete, I think we are planning to make ScopedPagePauser pause only pages in the same BrowsingContextGroup (instead of all pages). In that world, it will not happen that a DevTools breakpoint pauses "an unrelated tab that happens to share the same process because of either process reuse or the proposed ProcessPerSite mode".
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAH%2B8MBZNFXrJNaDq9%3D8qCMLWyGYHEz-XHX2GOY8T8%2BOkkHD5Yw%40mail.gmail.com.
I think after discussing all other options, I also like Charlie's proposal as it offers transparency to developers, while giving them agency on how to best proceed, without taking away choices (e.g. not allowing pausing at all).
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CABg10jzOh%2BcHXYSd4%3D%3DsoqWSrFhoK1W6CSMMrwoNg3CcZyNneg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAFSTc_gYs9naJ_0f%3Dj0zXKZh5C69Cbt-ATpLr%2BgbDT533VZPtw%40mail.gmail.com.