gh-106290: Fix edge cases around uops#106319
Conversation
- Longer traces - Explain reason for ending a trace - Support STORE_FAST_LOAD_FAST, STORE_FAST_STORE_FAST - Add deps on pycore_uops.h
This gives us LOAD_FAST_CHECK, LOAD_CLOSURE, and DELETE_FAST.
This doesn't work right yet, alas. If an error occurs in the first uop, the lineno is -1.
The trick is that EXIT_TRACE must decrement prev_instr.
|
While we're cleaning up uops, maybe we should change "trace" to "superblock"? There are already several other things using the name "trace", e.g. |
Sorry, something went wrong.
|
This (with uops on by default) benchmarks 2% slower than main (with uops off by default). I will now revert the final (temporary) commit that turns on uops by default and mark it as ready for review. |
Sorry, something went wrong.
(I just did that to be able to benchmark it and run the tests.) This reverts commit 5b85a49.
|
Maybe the leak is the optimizer created and installed initially. |
Sorry, something went wrong.
brandtbucher
left a comment
There was a problem hiding this comment.
The code itself looks good, haven't tried running it myself or anything. Just one note:
Sorry, something went wrong.
Use it to `#undef DPRINTF` instead (which also depends on a variable in this scope).
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 macOS 3.x has failed when building commit 2028a4f. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/725/builds/4943 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 420 tests OK. 10 slowest tests:
1 test failed: 22 tests skipped: 1 re-run test: Total duration: 10 min 6 sec Click to see traceback logsTraceback (most recent call last):
File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_unittest/testmock/testthreadingmock.py", line 173, in test_wait_until_any_call_positional
self.assertNotIn(call(2), something.method_1.mock_calls)
AssertionError: call(2) unexpectedly found in [call(2), call(1)]
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_unittest/testmock/testthreadingmock.py", line 172, in test_wait_until_any_call_positional
something.method_1.assert_called_with(1)
File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/unittest/mock.py", line 979, in assert_called_with
raise AssertionError(_error_message()) from cause
AssertionError: expected call not found.
Expected: method_1(1)
Actual: method_1(2)
|
Sorry, something went wrong.
A bit of an omnibus PR, alas (let me know if you want it split up). This does roughly the following (though not in that order):
SET_IPtoSAVE_IP(per Creation of superblocks faster-cpython/ideas#558)SAVE_IPuop at the start of the trace (ditto)unbound_local_error; this gives us uops forLOAD_FAST_CHECK,LOAD_CLOSURE, andDELETE_FASTSTORE_FAST_LOAD_FAST,STORE_FAST_STORE_FAST