| Code-Review | +1 |
Move GlobalSafepoint to IsolateGroupNit: [execution, heap]
if (Isolate* shared_isolate = shared_space_isolate()) {Nit: There should always be a shared space isolate, so I would drop the if here.
global_safepoint_ = std::make_unique<GlobalSafepoint>(this);I think you can move this into the else branch of `has_shared_space_isolate()`. When we set up the shared space isolate, we can also allocate GlobalSafepoint.
shared_space_isolate_ = nullptr;Nit: We could drop GlobalSafepoint here when dropping the shared space isolate. This mirrors AddIsolate() which sets up GlobalSafepoint when the shared space isolate is added. That said, this shouldn't affect Chrome where the main/shared-space isolate never goes away. There may be a few tests that trigger this code path though.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM
Isolate* shared_space_isolate() const;To fix the linker errors, this needs `V8_EXPORT_PRIVATE` (like on line 218, making this symbol visible on shared-library builds so that tests can call this).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Move GlobalSafepoint to IsolateGroupThomas LivelyNit: [execution, heap]
Done
if (Isolate* shared_isolate = shared_space_isolate()) {Nit: There should always be a shared space isolate, so I would drop the if here.
I've replaced the if with a DCHECK_NOT_NULL. The follow-up CL that will add a flag for enabling global safepoints without the shared heap might need the if again, but we can cross that bridge when we get to it.
To fix the linker errors, this needs `V8_EXPORT_PRIVATE` (like on line 218, making this symbol visible on shared-library builds so that tests can call this).
Done
global_safepoint_ = std::make_unique<GlobalSafepoint>(this);I think you can move this into the else branch of `has_shared_space_isolate()`. When we set up the shared space isolate, we can also allocate GlobalSafepoint.
The follow-on CL will have to move this out of the `v8_flags.shared_heap` check entirely, so I think keeping it somewhat separated here is useful.
shared_space_isolate_ = nullptr;Nit: We could drop GlobalSafepoint here when dropping the shared space isolate. This mirrors AddIsolate() which sets up GlobalSafepoint when the shared space isolate is added. That said, this shouldn't affect Chrome where the main/shared-space isolate never goes away. There may be a few tests that trigger this code path though.
Tying the lifetime of the GlobalSafepoint to the the lifetime of the shared space isolate is contrary to the goal of making it possible to have a GlobalSafepoint without a shared heap, i.e. without a shared space isolate.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@jkummerow, @dinfuehr, Please take another look because the votes were reset when the last patch set was uploaded.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
V8_EXPORT_PRIVATE Isolate* shared_space_isolate() const;It's `GlobalSafepoint::shared_space_isolate` that needs this annotation, not `IsolateSafepoint::…`.
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
I'll need the +1 votes again. Sorry for the churn.
V8_EXPORT_PRIVATE Isolate* shared_space_isolate() const;It's `GlobalSafepoint::shared_space_isolate` that needs this annotation, not `IsolateSafepoint::…`.
Thanks, fixed. What is the build config that would let me reproduce this problem locally? I took a look at the config on the failing bots, but it wasn't obvious to me.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Still LGTM
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
V8_EXPORT_PRIVATE Isolate* shared_space_isolate() const;Thomas LivelyIt's `GlobalSafepoint::shared_space_isolate` that needs this annotation, not `IsolateSafepoint::…`.
Thanks, fixed. What is the build config that would let me reproduce this problem locally? I took a look at the config on the failing bots, but it wasn't obvious to me.
When you expand step `7. build` and then nested in it step `5. lookup GN args`, and then click the `gn_args` link, you'll see the GN args. Usually that's enough to repro.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
global_safepoint_ = std::make_unique<GlobalSafepoint>(this);Thomas LivelyI think you can move this into the else branch of `has_shared_space_isolate()`. When we set up the shared space isolate, we can also allocate GlobalSafepoint.
The follow-on CL will have to move this out of the `v8_flags.shared_heap` check entirely, so I think keeping it somewhat separated here is useful.
Marking as resolved so we can land this.
shared_space_isolate_ = nullptr;Thomas LivelyNit: We could drop GlobalSafepoint here when dropping the shared space isolate. This mirrors AddIsolate() which sets up GlobalSafepoint when the shared space isolate is added. That said, this shouldn't affect Chrome where the main/shared-space isolate never goes away. There may be a few tests that trigger this code path though.
Tying the lifetime of the GlobalSafepoint to the the lifetime of the shared space isolate is contrary to the goal of making it possible to have a GlobalSafepoint without a shared heap, i.e. without a shared space isolate.
Marking as resolved so we can land this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[execution, heap] Move GlobalSafepoint to IsolateGroup
In preparation for an experiment in which we will enable global
safepoints without the shared heap, refactor the global safepoint
infrastructure to be associated with an IsolateGroup rather than the
IsolateGroup's shared heap isolate. A follow-on change will introduce a
new feature flag for enabling global safepoints without the shared heap.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |