-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vm] Avoid repeatedly re-setting stack limits on each dart invocation
Currently every invocation of a dart function will set and later on reset the stack limits. Doing so requires acquiring locks. Similarly because we have async ffi callbacks (another way to invoke dart code) the logic was duplicated there. Though the stack limit never changes for a given [OSThread]. Isolates can run on different [OSThread]s throughtout its lifetime. But an isolate always has to be entered on a native thread before it can execute dart code. => We initialize the stack limit when we scheduling an isolate on a thread and re-set it when unscheduling it. => That centralizes the place to one where we have to deal with stack limits and avoids repeated acquiring of locks on each embedder dart function invocation. TEST=ci Change-Id: Ia59ba8f92b93c58a990010ec75dfcd879aea2c43 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311960 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Loading branch information
1 parent
ac77af1
commit 45038a2
Showing
6 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters