GH-103082: Filter LINE events in VM, to simplify tool implementation. by markshannon · Pull Request #104387 · python/cpython · GitHub
Skip to content

GH-103082: Filter LINE events in VM, to simplify tool implementation.#104387

Merged
markshannon merged 8 commits intopython:mainfrom
faster-cpython:instrument-all-possible-lines
May 12, 2023
Merged

GH-103082: Filter LINE events in VM, to simplify tool implementation.#104387
markshannon merged 8 commits intopython:mainfrom
faster-cpython:instrument-all-possible-lines

Conversation

@markshannon
Copy link
Copy Markdown
Member

@markshannon markshannon commented May 11, 2023

When monitoring LINE events, instrument all instructions that can have a predecessor on a different line.
Then check that the a new line has been hit in the instrumentation code.
This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.

Fixes #103471
Fixes #104239

When monitoring LINE events, instrument all instructions that can have a predecessor on a different line.
Then check that the a new line has been hit in the instrumentation code.
This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
Copy link
Copy Markdown
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Okay, I feel like I have a pretty good grasp of what's going on here, and it looks good.

Just a couple of suggestions where you might add some comments in areas I struggled to finally understand, as well as a couple of questions to clarify some things I couldn't figure out:

Comment thread Lib/test/test_pdb.py
Comment thread Python/instrumentation.c
Comment thread Python/instrumentation.c
Comment thread Python/ceval.c
Comment thread Python/instrumentation.c
Comment thread Python/instrumentation.c
Comment thread Python/instrumentation.c
Comment thread Python/ceval.c
Comment thread Python/instrumentation.c
@markshannon markshannon added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 12, 2023
@bedevere-bot
Copy link
Copy Markdown

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 12, 2023
@markshannon
Copy link
Copy Markdown
Member Author

The failure on RHEL7 Refleaks PR also appears on main.

$ ./python -m test -R 3:3 test_typing
0:00:00 load avg: 1.97 Run tests sequentially
0:00:00 load avg: 1.97 [1/1] test_typing
beginning 6 repetitions
123456
.test test_typing failed -- Traceback (most recent call last):
  File "/home/mark/cpython/Lib/test/test_typing.py", line 6007, in test_bytestring
    with self.assertWarns(DeprecationWarning):
AssertionError: DeprecationWarning not triggered

test_typing failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_typing

Total duration: 546 ms
Tests result: FAILURE

The doc test failure is also unrelated, I think.

@markshannon markshannon merged commit 45f5aa8 into python:main May 12, 2023
@markshannon markshannon deleted the instrument-all-possible-lines branch May 12, 2023 11:21
@bedevere-bot
Copy link
Copy Markdown

carljm added a commit to carljm/cpython that referenced this pull request May 12, 2023
* main:
  pythongh-91896: Fixup some docs issues following ByteString deprecation (python#104422)
  pythonGH-104371: check return value of calling `mv.release` (python#104417)
  pythongh-104415: Fix refleak tests for `typing.ByteString` deprecation (python#104416)
  pythonGH-86275: Implementation of hypothesis stubs for property-based tests, with zoneinfo tests (python#22863)
  pythonGH-103082: Filter LINE events in VM, to simplify tool implementation. (pythonGH-104387)
  pythongh-93649: Split gc- and allocation tests from _testcapimodule.c (pythonGH-104403)
  pythongh-104389: Add 'unused' keyword to Argument Clinic C converters (python#104390)
  pythongh-101819: Prepare _io._IOBase for module state (python#104386)
  pythongh-104413: Fix refleak when super attribute throws AttributeError (python#104414)
  Fix refleak in `super_descr_get` (python#104408)
  pythongh-87526: Remove dead initialization from _zoneinfo parse_abbr() (python#24700)
  pythongh-91896: Improve visibility of `ByteString` deprecation warnings (python#104294)
  pythongh-104371: Fix calls to `__release_buffer__` while an exception is active (python#104378)
  pythongh-104377: fix cell in comprehension that is free in outer scope (python#104394)
  pythongh-104392: Remove _paramspec_tvars from typing (python#104393)
  pythongh-104396: uuid.py to skip platform check for emscripten and wasi (pythongh-104397)
  pythongh-99108: Refresh HACL* from upstream (python#104401)
  pythongh-104301: Allow leading whitespace in disambiguated pdb statements (python#104342)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants