843 Commits

Author SHA1 Message Date
Stan Ulbrych 622d97b8bb gh-139198: Remove Tools/scripts/checkpip.py script (GH-139199)
Commit
2025-10-30 11:50:16 +01:00
Weilin Du 698bab5a40 Doc: fix duplicated words (#136086)
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-06-29 18:04:02 -04:00
Mark Shannon 622300bdfa GH-132554: Add stats for GET_ITER (GH-132592)
* Add stats for GET_ITER

* Look for common iterable types, not iterator types

* Add stats for self iter and fix naming in summary
2025-04-29 09:00:14 +01:00
Irit Katriel df59226997 gh-100239: more refined specialisation stats for BINARY_OP/SUBSCR (#132068) 2025-04-04 15:33:31 +01:00
Neil Schemenauer 813bc5694b gh-130599: use static constants str-to-int conversion (gh-130714)
Avoid a data race in free-threaded builds due to mutating global arrays at
runtime.  Instead, compute the constants with an external Python script and
then define them as static global constant arrays.  These constants are
used by `long_from_non_binary_base()`.
2025-03-03 19:00:50 -08:00
Brandt Bucher 5fa7e1b7fd GH-129715: Remove _DYNAMIC_EXIT (GH-129716) 2025-02-07 11:41:17 -08:00
Diego Russo 567394517a GH-128842: Collect JIT memory stats (GH-128941) 2025-02-02 15:17:53 -08:00
Sam Gross a10f99375e Revert "GH-128914: Remove conditional stack effects from bytecodes.c and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.

This reverts commit ab61d3f430.
2025-01-23 09:26:25 +00:00
Mark Shannon ab61d3f430 GH-128914: Remove conditional stack effects from bytecodes.c and the code generators (GH-128918) 2025-01-20 17:09:23 +00:00
Mark Shannon a8dd821d5b GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-127110)
* Mark almost all reachable objects before doing collection phase

* Add stats for objects marked

* Visit new frames before each increment

* Update docs

* Clearer calculation of work to do.
2024-12-02 10:12:17 +00:00
alm 4e0a4cafe8 summarize: Fix typo in stats (#127450) 2024-11-30 18:07:54 +02:00
Hugo van Kemenade 899fdb213d Revert "GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)" (#126983) 2024-11-19 11:25:09 +02:00
Mark Shannon b0fcc2c47a GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-126502)
* Mark almost all reachable objects before doing collection phase

* Add stats for objects marked

* Visit new frames before each increment

* Remove lazy dict tracking

* Update docs

* Clearer calculation of work to do.
2024-11-18 14:31:26 +00:00
Mark Shannon c87b0e4a46 GH-124284: Add stats for refcount operations on immortal objects (GH-124288) 2024-09-23 19:10:55 +01:00
Jeff Glass acf69e09c6 gh-115178: Add Counts of UOp Pairs to pystats (GH-115181) 2024-04-16 14:27:18 +01:00
Mark Shannon c32dc47aca GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
Guido van Rossum 94c97423a9 Fix broken format in error for bad input in summarize_stats.py (#117375)
When you pass the script a non-existent input file, you get a TypeError instead of the intended ValueError.
2024-03-29 18:31:09 +00:00
Michael Droettboom 50369e6c34 gh-116996: Add pystats about _Py_uop_analyse_and_optimize (GH-116997) 2024-03-22 01:27:46 +08:00
Michael Droettboom 1a33513f99 gh-116879: Add new optimizer pystats to tables (GH-116880) 2024-03-16 23:10:43 +08:00
Nikita Sobolev 4704e55a71 gh-116576: Fix Tools/scripts/sortperf.py sorting the same list (#116577) 2024-03-11 09:38:04 +03:00
Michael Droettboom b05afdd5ec gh-115168: Add pystats counter for invalidated executors (GH-115169) 2024-02-26 17:51:47 +00:00
Guido van Rossum 142502ea8d Tier 2 cleanups and tweaks (#115534)
* Rename `_testinternalcapi.get_{uop,counter}_optimizer` to `new_*_optimizer`
* Use `_PyUOpName()` instead of` _PyOpcode_uop_name[]`
* Add `target` to executor iterator items -- `list(ex)` now returns `(opcode, oparg, target, operand)` quadruples
* Add executor methods `get_opcode()` and `get_oparg()` to get `vmdata.opcode`, `vmdata.oparg`
* Define a helper for printing uops, and unify various places where they are printed
* Add a hack to summarize_stats.py to fix legacy uop names (e.g. `POP_TOP` -> `_POP_TOP`)
* Define helpers in `test_opt.py` for accessing the set or list of opnames of an executor
2024-02-20 20:24:35 +00:00
Nikita Sobolev f9154f8f23 gh-108303: Move Lib/test/sortperf.py to Tools/scripts (#114687) 2024-02-18 10:27:14 +03:00
Michael Droettboom fbb0169731 gh-115362: Add documentation to pystats output (#115365) 2024-02-16 17:06:07 +00:00
Mark Shannon 8144661017 GH-113710: Fix updating of dict version tag and add watched dict stats (GH-115221) 2024-02-12 16:07:38 +00:00
Michael Droettboom ea3cd0498c gh-114312: Collect stats for unlikely events (GH-114493) 2024-01-25 11:10:51 +00:00
Michael Droettboom e45bae7a45 GH-114448: Don't sort summarize_stats.py histograms by amount of change (GH-114449) 2024-01-22 11:45:15 -08:00
Serhiy Storchaka b3d2427f22 gh-58032: Do not use argparse.FileType in module CLIs and scripts (GH-113649)
Open and close files manually. It prevents from leaking files,
preliminary creation of output files, and accidental closing of stdin
and stdout.
2024-01-10 15:07:19 +02:00
Guido van Rossum 7316dfb0eb gh-112320: Implement on-trace confidence tracking for branches (#112321)
We track the confidence as a scaled int.
2023-12-12 21:43:08 +00:00
Michael Droettboom 9495bcaf59 gh-111277: In summarize_stats.py, don't fail fast on invalid ratios (#111278) 2023-10-30 17:10:07 -07:00
Michael Droettboom 84b4533e84 gh-109329: Count tier2 opcode misses (#110561)
This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit.
2023-10-30 17:02:45 -07:00
Mark Shannon b0699aa544 GH-111213: Fix a few broken stats (GH-111216) 2023-10-26 11:33:12 +01:00
Michael Droettboom 81eba76450 gh-110019: Refactor summarize_stats (GH-110398) 2023-10-24 09:57:39 +01:00
Michael Droettboom 9eb2489266 gh-109329: Add stat for "trace too short" (GH-110402) 2023-10-05 16:12:06 +01:00
Michael Droettboom e561e98058 GH-109329: Add tier 2 stats (GH-109913) 2023-10-04 14:52:28 -07:00
Victor Stinner 53eb9a676f gh-110152: regrtest handles cross compilation and HOSTRUNNER (#110156)
* _add_python_opts() now handles cross compilation and HOSTRUNNER.
* display_header() now tells if Python is cross-compiled, display
  HOSTRUNNER, and get the host platform.
* Remove Tools/scripts/run_tests.py script.
* Remove "make hostrunnertest": use "make buildbottest"
  or "make test" instead.
2023-09-30 22:37:23 +00:00
Victor Stinner fbfec5642e gh-109566: regrtest reexecutes the process (#109909)
When --fast-ci or --slow-ci option is used, regrtest now replaces the
current process with a new process to add "-u -W default -bb -E"
options to Python.

Changes:

* PCbuild/rt.bat and Tools/scripts/run_tests.py no longer need to add
  "-u -W default -bb -E" options to Python: it's now done by
  regrtest.
* Fix Tools/scripts/run_tests.py: flush stdout before replacing the
  process. Previously, buffered messages were lost.
2023-09-26 20:46:52 +02:00
Victor Stinner 859618c8cd gh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)
* Add --fast-ci and --slow-ci options to libregrtest:

  * --fast-ci uses a default timeout of 10 minutes and "-u all,-cpu"
    (skip slowest tests).
  * --slow-ci uses a default timeout of 20 minues and "-u all" (run
    all tests).

* regrtest header now lists test resources.
* Makefile changes:

  * "make test", "make hostrunnertest" and "make coverage-report" now
    use --fast-ci option and TESTTIMEOUT variable.
  * "make buildbottest" now uses "--slow-ci". Remove options which
    became redundant with "--slow-ci".
  * "make testall" and "make testuniversal" now use --slow-ci option
    and TESTTIMEOUT variable.
  * "make testall" now uses "find -exec rm ..." instead of
    "find ... -print|xargs rm ...", same as "make clean".

* GitHub Actions workflow:

  * Ubuntu and Address Sanitizer jobs now use "make test". Remove
    options which became redundant with "--fast-ci".
  * Windows jobs now use --fast-ci option.
  * Use -j0 to detect the number of CPUs.

* Set Makefile TESTTIMEOUT default to an empty string, since
  --slow-ci and --fast-ci use different default timeout. It's now
  accepted to pass "--timeout=" to regrtest: treated as not timeout.
* Tools/scripts/run_tests.py now uses --fast-ci option.
* Tools/buildbot/test.bat now uses --slow-ci option. Remove
  --timeout=1200 option, redundant with --slow-ci.
2023-09-26 17:22:50 +02:00
Michael Droettboom 19f5effc27 GH-109373: Store metadata required for pystats comparison in the JSON (GH-109374) 2023-09-15 13:10:46 -07:00
Michael Droettboom 5dcbbd8861 GH-109330: Dump and compare stats using opcode names, not numbers (GH-109335) 2023-09-12 14:12:57 -07:00
Michael Droettboom 52beebc856 gh-109136: Fix summarize_stats.py tool (#109137) 2023-09-08 18:23:58 +02:00
Irit Katriel 665a4391e1 gh-105481: generate op IDs from bytecode.c instead of hard coding them in opcode.py (#107971) 2023-08-16 22:25:18 +00:00
Mark Shannon 2ba7c7f7b1 Add some GC stats to Py_STATS (GH-107581) 2023-08-04 10:34:23 +01:00
Victor Stinner ae00b810d1 gh-104780: Remove 2to3 program and lib2to3 module (#104781)
* Remove the Tools/scripts/2to3 script.
* Remove the Lib/test/test_lib2to3/ directory.
* Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object
  type.
* Makefile and PC/layout/main.py no longer compile lib2to3 grammar
  files.
* Update Makefile for 2to3 removal.
2023-05-23 19:40:02 +02:00
Carl Meyer 77262458fe gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270) 2023-05-11 08:08:13 -06:00
penguin_wwy 373bca0cc5 GH-102181: Improve specialization stats for SEND (GH-102182) 2023-05-10 22:40:59 +00:00
Missoupro 01a49d1745 gh-102110: Add all tools description missed (GH-102625)
Added missing descriptions of some tools.

Automerge-Triggered-By: GH:hugovk
2023-03-30 13:49:07 -07:00
Brandt Bucher 0444ae2487 GH-100982: Break up COMPARE_AND_BRANCH (GH-102801) 2023-03-23 15:25:09 -07:00
Mark Shannon 7b14c2ef19 GH-100982: Add COMPARE_AND_BRANCH instruction (GH-100983) 2023-01-16 12:35:21 +00:00
Mark Shannon c00eb1eae6 Don't double count misses. (GH-100984) 2023-01-13 15:57:39 +00:00