-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-139109: JIT _EXIT_TRACE to ENTER_EXECUTOR rather than _DEOPT #141573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,17 @@ def get_first_executor(func): | |
| pass | ||
| return None | ||
|
|
||
| def get_all_executors(func): | ||
| code = func.__code__ | ||
| co_code = code.co_code | ||
| execs = [] | ||
| for i in range(0, len(co_code), 2): | ||
| try: | ||
| execs.append(_opcode.get_executor(code, i)) | ||
| except ValueError: | ||
| pass | ||
| return execs | ||
|
|
||
|
|
||
| def iter_opnames(ex): | ||
| for item in ex: | ||
|
|
@@ -2629,6 +2640,18 @@ def gen(): | |
| next(g) | ||
| """ % _testinternalcapi.SPECIALIZATION_THRESHOLD)) | ||
|
|
||
| def test_executor_side_exits_create_another_executor(self): | ||
| def f(): | ||
| for x in range(TIER2_THRESHOLD + 3): | ||
| for y in range(TIER2_THRESHOLD + 3): | ||
| z = x + y | ||
|
|
||
| f() | ||
| # Inner loop warms up first. | ||
| # Outer loop warms up later, linking to the inner one. | ||
| # Therefore, at least two executors. | ||
Fidget-Spinner marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| self.assertGreaterEqual(len(get_all_executors(f)), 2) | ||
|
||
|
|
||
|
|
||
| def global_identity(x): | ||
| return x | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.