Repository navigation
Commit e4a2473
* gh-152721: Fix quadratic RLE replay time in the profiling binary reader
* gh-152721: Clarify the batch-list comment
Reword per review: the list is built with append per element, not
pre-sized; note the old alloc(count - i) + trim per batch was O(count^2).
* Cap RLE batch size to bound the per-batch timestamp list
* Move MAX_RLE_BATCH_SAMPLES comment to its own line (keep under 79 cols)
* Drop the now-redundant emit_batch trim and fix the review nits
The batch list is built to its exact size, so the PyList_SetSlice trim was a no-op; call emit_sample directly. Also point the cap comment at the issue (gh-151378) and drop the stale over-long comment.
* gh-152721: Test replay batches beyond the RLE limit
---------
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
1 parent 8df2580 commit e4a2473
3 files changed
Lines changed: 93 additions & 24 deletions
File tree
- Lib/test/test_profiling/test_sampling_profiler
- Misc/NEWS.d/next/Library
- Modules/_remote_debugging
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
1503 | 1504 | | |
1504 | 1505 | | |
1505 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1506 | 1578 | | |
1507 | 1579 | | |
1508 | 1580 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
1083 | 1086 | | |
1084 | 1087 | | |
1085 | 1088 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | 1089 | | |
1102 | 1090 | | |
1103 | 1091 | | |
| |||
1226 | 1214 | | |
1227 | 1215 | | |
1228 | 1216 | | |
1229 | | - | |
| 1217 | + | |
| 1218 | + | |
1230 | 1219 | | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1234 | 1223 | | |
1235 | 1224 | | |
1236 | 1225 | | |
1237 | 1226 | | |
1238 | 1227 | | |
1239 | | - | |
| 1228 | + | |
1240 | 1229 | | |
1241 | 1230 | | |
1242 | 1231 | | |
| |||
1249 | 1238 | | |
1250 | 1239 | | |
1251 | 1240 | | |
1252 | | - | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1253 | 1248 | | |
1254 | 1249 | | |
1255 | 1250 | | |
1256 | 1251 | | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
1260 | 1255 | | |
1261 | 1256 | | |
1262 | 1257 | | |
| |||
0 commit comments