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-115999: Implement thread-local bytecode and enable specialization for BINARY_OP #123926

Open
wants to merge 80 commits into
base: main
Choose a base branch
from

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    776a1e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b40870 View commit details
    Browse the repository at this point in the history
  3. Get bytecode copying working

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    344d7ad View commit details
    Browse the repository at this point in the history
  4. Refactor remove_tools

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    f203d00 View commit details
    Browse the repository at this point in the history
  5. Refactor remove_line_tools

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    82b456a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b021704 View commit details
    Browse the repository at this point in the history
  7. Use locks for instrumentation

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    aea69c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    552277d View commit details
    Browse the repository at this point in the history
  9. Specialize BINARY_OP

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    50a6089 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3f1d941 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7d2eb27 View commit details
    Browse the repository at this point in the history
  12. Fix a few data races when (de)instrumenting opcodes

    - Fix a few places where we were not using atomics to (de)instrument
      opcodes.
    - Fix a few places where we weren't using atomics to reset adaptive
      counters.
    - Remove some redundant non-atomic resets of adaptive counters that
      presumably snuck as merge artifacts of python#118064
      and python#117144 landing close
      together.
    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    d5476b9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e3b367a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b2375bf View commit details
    Browse the repository at this point in the history
  15. Load bytecode on RESUME_CHECK

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    2707f8e View commit details
    Browse the repository at this point in the history
  16. Load tlbc on generator.throw()

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    3fdcb28 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4a55ce5 View commit details
    Browse the repository at this point in the history
  18. Use tlbc everywhere

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    8b3ff60 View commit details
    Browse the repository at this point in the history
  19. Explicitly manage tlbc state

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    862afa1 View commit details
    Browse the repository at this point in the history
  20. Refactor API for fetching tlbc

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    0b4d952 View commit details
    Browse the repository at this point in the history
  21. Add unit tests

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    7795e99 View commit details
    Browse the repository at this point in the history
  22. Fix initconfig in default build

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    693a4cc View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    b43531e View commit details
    Browse the repository at this point in the history
  24. Synchronize bytecode modifications between specialization and instrum…

    …entation using atomics
    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    9025f43 View commit details
    Browse the repository at this point in the history
  25. Add a high-level comment

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    c44c7d9 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    e2a6656 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    e6513d1 View commit details
    Browse the repository at this point in the history
  28. Fix formatting

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    a18396f View commit details
    Browse the repository at this point in the history
  29. Remove comment

    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    81fe1a2 View commit details
    Browse the repository at this point in the history
  30. Fix data race in _PyInstruction_GetLength

    Read the opcode atomically, the interpreter may be specializing it
    mpage committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    837645e View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Fix tier2 optimizer

    uops that uses `this_instr` are not eligible to be included in traces.
    Restore `RESUME_CHECK` to its original implemenation and inline reloading
    bytecode, which does not need to reset `this` since nothing else in
    `RESUME_CHECK` uses it.
    mpage committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f13e132 View commit details
    Browse the repository at this point in the history
  2. Use __VA_ARGS__ for macros

    Named argument lists apparently aren't supported on windows
    mpage committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    942f628 View commit details
    Browse the repository at this point in the history
  3. Update vcxproj files to include newly added files

    Hopefully I did this correctly.
    mpage committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    66cb24d View commit details
    Browse the repository at this point in the history
  4. Mark unused params

    mpage committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    ad12bd4 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Configuration menu
    Copy the full SHA
    1bbbbbc View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Configuration menu
    Copy the full SHA
    e63e403 View commit details
    Browse the repository at this point in the history
  2. Update libpython for gdb

    mpage committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    8b97771 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d34adeb View commit details
    Browse the repository at this point in the history
  4. Handle out of memory errors

    mpage committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    6d4fe73 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    c2d8693 View commit details
    Browse the repository at this point in the history
  2. Fix warnings on windows

    mpage committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    b104782 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. Fix another warning

    mpage committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    deb5216 View commit details
    Browse the repository at this point in the history
  2. Ugh actually fix it

    mpage committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    2f11cc7 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    04f1ac3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa330b1 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    7dfd1ca View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Exclude tlbc from refleak counts

    TLBC is intended to be reused across threads with different lifetimes,
    so may appear as a "leak" depending on the order in which threads execute
    code objects. They are freed when the code object is destroyed, which
    typically occurs when the runtime is finalized.
    mpage committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    7c9da24 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. Configuration menu
    Copy the full SHA
    dd144d0 View commit details
    Browse the repository at this point in the history
  2. Regen files

    mpage committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    ad180d1 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    95d2264 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b6380de View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. Configuration menu
    Copy the full SHA
    adb59ef View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    39c947d View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. Configuration menu
    Copy the full SHA
    2cc5830 View commit details
    Browse the repository at this point in the history
  2. Make RESUME_CHECK cheaper

    mpage committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    96ec126 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ecebd9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    815b2fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fb90d23 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2024

  1. Replace bytecode pointer with tlbc_index

    This uses less space
    mpage committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    4e42414 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Configuration menu
    Copy the full SHA
    814e4ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ba3930a View commit details
    Browse the repository at this point in the history
  3. Fix indentation

    mpage committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    cb8a774 View commit details
    Browse the repository at this point in the history
  4. Clarify comment

    mpage committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    0f8a55b View commit details
    Browse the repository at this point in the history
  5. Fix TSAN

    mpage committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    70ce0fe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f512353 View commit details
    Browse the repository at this point in the history
  7. Remove test_tlbc.py

    mpage committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    4be2b1f View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Configuration menu
    Copy the full SHA
    61c7aa9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab6222c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bbb220 View commit details
    Browse the repository at this point in the history
  4. Update comment

    mpage committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    4580e3c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b992f44 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Configuration menu
    Copy the full SHA
    4c040d3 View commit details
    Browse the repository at this point in the history
  2. Fix incorrect types

    mpage committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    5b7658c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bec5bce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c9054b7 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Avoid special casing in _PyEval_GetExecutableCode

    It's cleaner to assign all threads the index of the main copy of the
    bytecode when tlbc is disabled rather than adding a special case
    in _PyEval_GetExecutableCode.
    mpage committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    1a48ab2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b16ae5f View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. Configuration menu
    Copy the full SHA
    176b24e View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. Configuration menu
    Copy the full SHA
    c107495 View commit details
    Browse the repository at this point in the history
  2. Remove _get_tlbc_blocks

    mpage committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    07f9140 View commit details
    Browse the repository at this point in the history