Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0eac77b
resolve conflict
savannahostrowski Jul 26, 2024
d576296
tests pass except ssl
savannahostrowski Jun 25, 2024
68e95d6
remove file
savannahostrowski Jul 26, 2024
c903af4
this is broken
savannahostrowski Aug 12, 2024
5ca6b7f
gc approach
savannahostrowski Aug 12, 2024
beb4f65
rebase
savannahostrowski Aug 12, 2024
427dbf5
Update has_run to run_count
savannahostrowski Aug 13, 2024
92d5590
update initialized run_count and move invalidate old
savannahostrowski Aug 13, 2024
0cdf638
set threshold to 1`
savannahostrowski Aug 13, 2024
58e7447
move incrementing run count into a new op
savannahostrowski Aug 14, 2024
6c047e4
add invalidation threshold in gc of 10
savannahostrowski Aug 20, 2024
2645023
move back to incremenet
savannahostrowski Aug 20, 2024
7c7ae98
remove print
savannahostrowski Aug 20, 2024
6d6d306
move invalidation to executor creation
savannahostrowski Aug 27, 2024
4d086fe
change threshold
savannahostrowski Aug 27, 2024
d08e45a
new line
savannahostrowski Aug 27, 2024
6315877
update constant
savannahostrowski Aug 27, 2024
622c266
📜🤖 Added by blurb_it.
blurb-it[bot] Aug 27, 2024
e5117b2
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Aug 29, 2024
7c6704c
resolve conflict
savannahostrowski Jul 26, 2024
1d72fdd
tests pass except ssl
savannahostrowski Jun 25, 2024
1778185
remove file
savannahostrowski Jul 26, 2024
2506821
this is broken
savannahostrowski Aug 12, 2024
fca6dec
gc approach
savannahostrowski Aug 12, 2024
29436fd
rebase
savannahostrowski Aug 12, 2024
b969b11
Update has_run to run_count
savannahostrowski Aug 13, 2024
a669e0f
update initialized run_count and move invalidate old
savannahostrowski Aug 13, 2024
deb73ec
set threshold to 1`
savannahostrowski Aug 13, 2024
9fa55e8
move incrementing run count into a new op
savannahostrowski Aug 14, 2024
e4a461a
add invalidation threshold in gc of 10
savannahostrowski Aug 20, 2024
d5a2bed
move back to incremenet
savannahostrowski Aug 20, 2024
d232e63
remove print
savannahostrowski Aug 20, 2024
e4a456a
move invalidation to executor creation
savannahostrowski Aug 27, 2024
b7d2d5a
change threshold
savannahostrowski Aug 27, 2024
6dcd2dc
new line
savannahostrowski Aug 27, 2024
219f890
update constant
savannahostrowski Aug 27, 2024
fb7b04d
📜🤖 Added by blurb_it.
blurb-it[bot] Aug 27, 2024
ea397a3
Merge branch 'jit-mem-invalidate-10' of https://github.com/savannahos…
savannahostrowski Aug 29, 2024
310d20c
address pr comments
savannahostrowski Aug 30, 2024
d2f9dc4
refactor invalidatecold
savannahostrowski Aug 30, 2024
d755d56
refactor to was_run bool
savannahostrowski Aug 30, 2024
c9534c0
update blurb
savannahostrowski Aug 30, 2024
61cd3c5
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Aug 30, 2024
e5065ad
Update op name to be more reflective of was_run
savannahostrowski Aug 30, 2024
2d09259
fix typo
savannahostrowski Aug 30, 2024
d2e8e29
rename uop
savannahostrowski Aug 30, 2024
a894598
dedent and initialize executors_created
savannahostrowski Aug 31, 2024
758ee03
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 1, 2024
1927bfe
address some PR comments
savannahostrowski Sep 1, 2024
8ee0d7f
Update Python/optimizer.c
savannahostrowski Sep 1, 2024
cedd65d
Update Python/optimizer.c
savannahostrowski Sep 1, 2024
0a9b5b6
make was_run uint`
savannahostrowski Sep 1, 2024
180a68e
add comment for JIT_CLEANUP_THRESHOLD
savannahostrowski Sep 1, 2024
7cb9cba
Remove extraneous reset of executors_created
savannahostrowski Sep 1, 2024
8939ecf
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 3, 2024
00f03d2
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 3, 2024
4981ab2
Merge branch 'jit-mem-invalidate-10' of https://github.com/savannahos…
savannahostrowski Sep 3, 2024
3c59316
condense conditional statements
savannahostrowski Sep 3, 2024
306c3c3
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 10, 2024
fe50615
Address PR comments from Brandt and Mark
savannahostrowski Sep 13, 2024
d51817b
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 13, 2024
131618a
Merge branch 'main' into jit-mem-invalidate-10
savannahostrowski Sep 17, 2024
5961103
Refactor to use eval breaker
savannahostrowski Sep 17, 2024
99262b6
Address comments
savannahostrowski Sep 19, 2024
230fe05
Update to 10k
savannahostrowski Sep 19, 2024
f3c01a1
Update to 1m
savannahostrowski Sep 19, 2024
563a4d7
update cases
savannahostrowski Sep 19, 2024
062c54f
add py_set_eval_breaker_bit to nonescaping'
savannahostrowski Sep 23, 2024
17ece50
create 100k branch
savannahostrowski Sep 23, 2024
beea8c6
Merge branch 'main' into jit-inv-mem-100k
savannahostrowski Sep 24, 2024
eb48f82
Merge branch 'main' into jit-inv-mem-100k
savannahostrowski Sep 24, 2024
34363f2
Address comments from Brandt
savannahostrowski Sep 24, 2024
77e81d4
Merge branch 'main' into jit-inv-mem-100k
savannahostrowski Sep 25, 2024
09e3300
Dedent goto error
savannahostrowski Sep 25, 2024
8ff071f
Merge branch 'main' into jit-inv-mem-100k
savannahostrowski Sep 26, 2024
f238189
Address comments
savannahostrowski Sep 26, 2024
ec99d5a
Merge branch 'main' into jit-inv-mem-100k
savannahostrowski Sep 26, 2024
9526d84
Add -mno-outline-atomics flag
savannahostrowski Sep 26, 2024
18febc7
Comment and fix init
savannahostrowski Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add invalidation threshold in gc of 10
  • Loading branch information
savannahostrowski committed Aug 29, 2024
commit e4a461a68cbfde4bb750cc57b829fca750fa0d49
7 changes: 6 additions & 1 deletion Python/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,8 @@ Py_ssize_t
_PyGC_Collect(PyThreadState *tstate, int generation, _PyGC_Reason reason)
{
GCState *gcstate = &tstate->interp->gc;
static int invalidation_counter = 0;
const int invalidation_threshold = 10;

int expected = 0;
if (!_Py_atomic_compare_exchange_int(&gcstate->collecting, &expected, 1)) {
Expand Down Expand Up @@ -1862,8 +1864,11 @@ _PyGC_Collect(PyThreadState *tstate, int generation, _PyGC_Reason reason)
}
if (reason != _Py_GC_REASON_SHUTDOWN) {
invoke_gc_callback(gcstate, "stop", generation, &stats);
_Py_Executors_InvalidateOld(tstate->interp, 0);

if (++invalidation_counter >= invalidation_threshold) {
invalidation_counter = 0;
_Py_Executors_InvalidateOld(tstate->interp, 0);
}
}
_PyErr_SetRaisedException(tstate, exc);
GC_STAT_ADD(generation, objects_collected, stats.collected);
Expand Down