This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年11月08日 19:56 by nascheme, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| profile-opt-stamp.txt | nascheme, 2016年11月08日 21:44 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4223 | merged | nascheme, 2017年11月01日 21:09 | |
| Messages (6) | |||
|---|---|---|---|
| msg280342 - (view) | Author: Neil Schemenauer (nascheme) * (Python committer) | Date: 2016年11月08日 19:56 | |
I notice that after running "make" then running "make install", the build will go through the whole compile/profile/compile process again. This is really infuriating behaviour, given the extremely long make time for the profiled optimized build. The problem appears to me to be that the "profile-opt" target does not have proper dependencies. I think changing it to: profile-opt: $(BUILDPYTHON) should fix it. If my "make install" ever finishes, maybe I will test it. ;-) |
|||
| msg280354 - (view) | Author: Neil Schemenauer (nascheme) * (Python committer) | Date: 2016年11月08日 21:44 | |
Okay, my initial idea was wrong (I blame years of not having to look at Makefiles). I think the attached patch works. It uses a "stamp" file to record the fact that the profiled build is complete. The fix is sub-optimal because changing some source code and re-running "make" will not rebuild as needed. That would require proper dependencies in the Makefile, rather than treating "make" as an imperative scripting language (e.g. recursively calling make to sequence things). Given that the profile optimised build is unlikely to be used during development, I guess that's not so bad. |
|||
| msg305443 - (view) | Author: Neil Schemenauer (nascheme) * (Python committer) | Date: 2017年11月02日 17:46 | |
New changeset 4e38d71a2b7b606fb1b0078c2d7014fc24044dac by Neil Schemenauer in branch 'master': bpo-28643: Record profile-opt build progress with stamp files (#4223) https://github.com/python/cpython/commit/4e38d71a2b7b606fb1b0078c2d7014fc24044dac |
|||
| msg305661 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2017年11月06日 17:20 | |
Oh, I had this bug and I'm quite sure that I reported it, but I cannot find it anymore :-) |
|||
| msg305664 - (view) | Author: Neil Schemenauer (nascheme) * (Python committer) | Date: 2017年11月06日 17:38 | |
The previous behavior nearly drove me to drink. At least on my machine (and I have a relatively fast one), the profile-opt build takes a long time. After running "make" and checking things over, running "make install" will cause the whole process (make clean, make with -fprofile-generate, run unit tests, make clean, make with -fprofile-use) to happen again. The profile-opt build is significantly faster so I like to use it. Maybe I'm an odd duck in that I usually compile Python myself rather than using distro packaged versions. Current behavior is much better I think. You have to know to manually remove "profile-run-stamp" if you want the -fprofile-generate + unittest to run again. "make clean" does not remove it. I don't know if that should be documented somewhere besides in the Makefile. |
|||
| msg321750 - (view) | Author: Neil Schemenauer (nascheme) * (Python committer) | Date: 2018年07月16日 17:56 | |
Closing this as the current makefile works much better in this regard, at least based on my experience. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:39 | admin | set | github: 72829 |
| 2018年07月16日 17:56:54 | nascheme | set | status: open -> closed resolution: fixed messages: + msg321750 stage: patch review -> resolved |
| 2017年11月06日 17:38:43 | nascheme | set | messages: + msg305664 |
| 2017年11月06日 17:20:06 | vstinner | set | nosy:
+ vstinner messages: + msg305661 |
| 2017年11月02日 17:46:04 | nascheme | set | messages: + msg305443 |
| 2017年11月01日 21:09:32 | nascheme | set | keywords:
+ patch pull_requests: + pull_request4191 |
| 2017年04月07日 21:02:57 | dgreiman | set | nosy:
+ dgreiman |
| 2016年11月09日 17:01:00 | brett.cannon | set | stage: needs patch -> patch review |
| 2016年11月09日 17:00:52 | brett.cannon | set | nosy:
+ brett.cannon, gregory.p.smith |
| 2016年11月08日 21:44:44 | nascheme | set | files:
+ profile-opt-stamp.txt messages: + msg280354 |
| 2016年11月08日 19:56:35 | nascheme | create | |