Skip to content
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

gh-114312: Collect stats for unlikely events #114493

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Jan 23, 2024

This has been benchmarked here (1.00x faster) and the stats collected from the pyperformance suite are:

Event Count
set_class 0
set_bases 40
set_eval_frame_func 0
builtin_dict 0
func_modification 220

@mdboom
Copy link
Contributor Author

mdboom commented Jan 23, 2024

Note that modifying func.__closure__ (mentioned in the original bug) isn't possible, so that's another one we don't need to worry about.

@mdboom
Copy link
Contributor Author

mdboom commented Jan 23, 2024

Just for interest: The set_bases mutation is all from the mypy2 benchmark, and func_modifications comes from async_generators, dask, docutils and mypy2.

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thanks.

@markshannon markshannon merged commit ea3cd04 into python:main Jan 25, 2024
32 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 Debian Clang LTO + PGO 3.x has failed when building commit ea3cd04.

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/all/#builders/1084/builds/3189) and take a look at the build logs.
  4. Check if the failure is related to this commit (ea3cd04) 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/all/#builders/1084/builds/3189

Failed tests:

  • test_optimizer

Failed subtests:

  • test_func_modification - test.test_optimizer.TestRareEventCounters.test_func_modification
  • test_builtin_dict - test.test_optimizer.TestRareEventCounters.test_builtin_dict

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/arm64-clang/3.x.gps-arm64-debian.clang.lto-pgo/build/Lib/test/test_optimizer.py", line 69, in test_func_modification
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["func_modification"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 187647121162244 != 281470681743364


Traceback (most recent call last):
  File "/var/lib/buildbot/workers/arm64-clang/3.x.gps-arm64-debian.clang.lto-pgo/build/Lib/test/test_optimizer.py", line 52, in test_builtin_dict
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["builtin_dict"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 281470681743361 != 187647121162241

@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 RHEL8 3.x has failed when building commit ea3cd04.

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/all/#builders/529/builds/5782) and take a look at the build logs.
  4. Check if the failure is related to this commit (ea3cd04) 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/all/#builders/529/builds/5782

Failed tests:

  • test_optimizer

Failed subtests:

  • test_func_modification - test.test_optimizer.TestRareEventCounters.test_func_modification

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-RHEL8-aarch64/build/Lib/test/test_optimizer.py", line 69, in test_func_modification
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["func_modification"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 8320542925956055046 != 281470681743366


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64/build/Lib/test/test_optimizer.py", line 69, in test_func_modification
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["func_modification"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 9897122950987907078 != 281470681743366

@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 RHEL8 LTO 3.x has failed when building commit ea3cd04.

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/all/#builders/338/builds/5946) and take a look at the build logs.
  4. Check if the failure is related to this commit (ea3cd04) 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/all/#builders/338/builds/5946

Failed tests:

  • test_optimizer

Failed subtests:

  • test_func_modification - test.test_optimizer.TestRareEventCounters.test_func_modification

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-RHEL8-aarch64.lto/build/Lib/test/test_optimizer.py", line 69, in test_func_modification
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["func_modification"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 281470681743366 != 6

@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 Fedora Stable LTO 3.x has failed when building commit ea3cd04.

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/all/#builders/336/builds/4578) and take a look at the build logs.
  4. Check if the failure is related to this commit (ea3cd04) 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/all/#builders/336/builds/4578

Failed tests:

  • test_optimizer

Failed subtests:

  • test_func_modification - test.test_optimizer.TestRareEventCounters.test_func_modification

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-aarch64.lto/build/Lib/test/test_optimizer.py", line 69, in test_func_modification
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        orig_counter + 1,
        ^^^^^^^^^^^^^^^^^
        _testinternalcapi.get_rare_event_counters()["func_modification"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 281470681743366 != 6

mdboom added a commit to mdboom/cpython that referenced this pull request Jan 25, 2024
These new tests from python#114493 were failing on aarch64 buildbots,
presumably because of the mismatch between uint8_t and the 'k'
code to Py_BuildValue.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants