GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@chris-eibl chris-eibl commented Mar 9, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Maybe a skip news?

Performance neutral, see #131033.

  • Issue: Let clang on Linux and clang-cl on Windows "see" more optimizing macros #131033

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chris-eibl added 2 commits March 9, 2025 11:50
@chris-eibl
Enable XML_ATTR_MALLOC and XML_ATTR_ALLOC_SIZE for
01183d7
clang-cl on Windows
@chris-eibl
Enable UNLIKELY and LIKELY for clang-cl on Windows
16a7f46
@bedevere-app bedevere-app Bot added the awaiting review label Mar 9, 2025
@chris-eibl

chris-eibl commented Mar 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Ups, expat_external.h so this one should be left alone (or thouched upstream). So setting to draft for now,

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
chris-eibl marked this pull request as draft March 9, 2025 18:25
@bedevere-app bedevere-app Bot removed the awaiting review label Mar 9, 2025
Fidget-Spinner
Fidget-Spinner approved these changes Mar 9, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added the awaiting merge label Mar 9, 2025
@picnixz

picnixz commented Mar 9, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
Revert "Enable XML_ATTR_MALLOC and XML_ATTR_ALLOC_SIZE "
1c4a55d
This reverts commit 01183d7.
@chris-eibl chris-eibl mentioned this pull request Mar 10, 2025
Let clang on Linux and clang-cl on Windows "see" more optimizing macros #131033
Closed
@chris-eibl 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
@chris-eibl
chris-eibl marked this pull request as ready for review March 10, 2025 09:02
@bedevere-app bedevere-app Bot added awaiting review and removed awaiting merge labels Mar 10, 2025
@picnixz

picnixz commented Aug 22, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Aug 23, 2025

Copy link
Copy Markdown
Member Author

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
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl chris-eibl added the skip news label Aug 23, 2025
picnixz
picnixz approved these changes Aug 23, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 23, 2025
zooba
zooba reviewed Aug 25, 2025
View reviewed changes
Comment thread Objects/obmalloc.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
update comment
577bba7
@zooba
zooba merged commit 95d6e0b into python:main Aug 25, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 25, 2025
@chris-eibl
chris-eibl deleted the clang_opt branch August 25, 2025 21:28
@bedevere-bot

bedevere-bot commented Aug 25, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ 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:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. 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.
  4. Check if the failure is related to this commit (95d6e0b) or if it is a false positive.
  5. 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:

  • test_external_inspection

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 25, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Refleaks 3.x (tier-3) has failed when building commit 95d6e0b.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. 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.
  4. Check if the failure is related to this commit (95d6e0b) or if it is a false positive.
  5. 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba left review comments
@AA-Turner AA-Turner AA-Turner left review comments
@picnixz picnixz picnixz approved these changes
@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

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.

6 participants

@chris-eibl @picnixz @bedevere-bot @zooba @AA-Turner @Fidget-Spinner
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.