◐ Shell
reader mode source ↗
Skip to content

bpo-37146: Allow to configure opcode cache and fix huntleaks by presetting it to 1#13789

Closed
pablogsal wants to merge 4 commits into
python:masterfrom
pablogsal:refleaks
Closed

bpo-37146: Allow to configure opcode cache and fix huntleaks by presetting it to 1#13789
pablogsal wants to merge 4 commits into
python:masterfrom
pablogsal:refleaks

Conversation

@pablogsal

@pablogsal pablogsal commented Jun 3, 2019

Copy link
Copy Markdown
Member

@pablogsal

Copy link
Copy Markdown
Member Author

Tested locally:

❯ ./python -m test -R 3:3 test_pprint
Run tests sequentially
0:00:00 load avg: 1.57 [1/1] test_pprint
beginning 6 repetitions
123456
......

== Tests result: SUCCESS ==

1 test OK.

Total duration: 751 ms
Tests result: SUCCESS

@pablogsal

Copy link
Copy Markdown
Member Author

Tested also with ./python -m test -R 3:3 -j0 -r -x test_asyncio -x test_multiprocessing_spawn

@pablogsal pablogsal changed the title Allow to configure minruns of the opcode cache and fix huntleaks by presetting it to 1 Jun 3, 2019
@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@methane

methane commented Jun 3, 2019

Copy link
Copy Markdown
Member

The code object will be optimized only when ++co->co_opcache_flag == opcacheminruns.
So decreasing min_runs by _setopcacheminruns()will cause some hot codes will be not
optimized forever. I don't want to expose such switch.

Please use #13787 for 3.8b1.

@vstinner

vstinner commented Jun 3, 2019

Copy link
Copy Markdown
Member

Please use #13787 for 3.8b1.

I like #13787, it's a reasonable workaround for beta1. We can design a better fix after the beta.

@pablogsal

Copy link
Copy Markdown
Member Author

Ok, I will close this PR then.

@pablogsal pablogsal closed this Jun 3, 2019
@vstinner

vstinner commented Jun 3, 2019

Copy link
Copy Markdown
Member

Ok, I will close this PR then.

Maybe keep it around, it's sounds like a good fix for post-beta1.

@pablogsal pablogsal deleted the refleaks branch May 19, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants