GeezerVison is showing github.com — GH-131033: Enable the optimizing macros UNLIKELY and LIKELY for clang-cl on Windows by chris-eibl · Pull Request #131019 · python/cpython
Conversation
chris-eibl
commented
Mar 9, 2025
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Maybe a skip news?
Performance neutral, see #131033.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chris-eibl
commented
Mar 9, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Ups, expat_external.h so this one should be left alone (or thouched upstream). So setting to draft for now,
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
commented
Mar 9, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Not a skip issue IMO because benchmarks reported on the issue + possible discussion on the issue rather than the PR may be worthwile.
Also it's sometimes good to be able to gather similar improvements under an umbrella issue
|
chris-eibl reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chris-eibl
changed the title
Enable the optimizing macros UNLIKELY, LIKELY, XML_ATTR_MALLOC and XML_ATTR_ALLOC_SIZE for clang-cl on Windows
GH-131033: Enable the optimizing macros UNLIKELY and LIKELY for clang-cl on Windows
Mar 10, 2025
picnixz
commented
Aug 22, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
@chris-eibl could you add a small NEWS entry under the build section? I think it would be good to know that these macros are now enabled when possible (at least for object allocation). Or maybe the formulation would be too obscure? if this is the case, just add skip news and I'll merge.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I'd go with skip news, since according to @zooba #131279 (comment)
[...], since we still aren't technically supporting clang-cl on Windows yet,
clang-cl on Windows is quite niche, and I can't think of anything better than something like
Enable the optimizing macros UNLIKELY and LIKELY for clang-cl on Windows in obmalloc.c.
which is indeed not much help.
I'd happily blurb it like so if this deems reasonable.
|
picnixz reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot s390x Fedora Stable Refleaks 3.x (tier-3) has failed when building commit 95d6e0b.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1641/builds/810) and take a look at the build logs.
- Check if the failure is related to this commit (95d6e0b) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1641/builds/810
Failed tests:
Failed subtests:
- test_only_active_thread - test.test_external_inspection.TestGetStackTrace.test_only_active_thread
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_external_inspection.py", line 1246, in test_only_active_thread
self.assertEqual(
~~~~~~~~~~~~~~~~^
len(gil_traces), 1, "Should have exactly one GIL holder"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
AssertionError: 0 != 1 : Should have exactly one GIL holder
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 FreeBSD Refleaks 3.x (tier-3) has failed when building commit 95d6e0b.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1613/builds/1889) and take a look at the build logs.
- Check if the failure is related to this commit (95d6e0b) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1613/builds/1889
Test leaking resources:
- test_events: references
- test_events: memory blocks
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 837, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('127.0.0.1', 22458), raddr=('127.0.0.1', 22459)>
Task was destroyed but it is pending!
task: <Task pending name='Task-2677' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x843f20350>:
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line 873, in __del__
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=9>
k
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 837, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('127.0.0.1', 28487), raddr=('127.0.0.1', 28488)>
Task was destroyed but it is pending!
task: <Task pending name='Task-2435' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x8453bc350>:
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line 873, in __del__
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=9>
k
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
zooba
zooba left review comments
picnixz
picnixz approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|