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 2008年03月02日 23:45 by MrJean1, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| hires_hotshot.tgz | MrJean1, 2008年03月02日 23:45 | |||
| hires_hotshot2.tgz | MrJean1, 2008年03月04日 23:52 | |||
| hires_hotshot3.tgz | MrJean1, 2008年03月08日 00:30 | |||
| hires_hotshot4.tgz | MrJean1, 2008年03月09日 22:45 | |||
| hires_hotshot5.tgz | MrJean1, 2008年03月12日 21:46 | |||
| hires_hotshot_2.6.diffs.tgz | MrJean1, 2008年03月22日 19:31 | |||
| Messages (10) | |||
|---|---|---|---|
| msg63194 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月02日 23:45 | |
The _hotshot module uses the gettimeofday function to profile the run time. I enhanced the hotshot module in Python 2.5.2 to use a high resolution timer where available (RDTSC on x86/_64, MFTB/U on PowerPC and gethrtime on Solaris). The improved hotshot module has been tested on 32-bit MacOS X 10.4.11 Tiger (Intel) and 10.3.9 Panther (PPC), on 64-bit RHEL 3u7 (Opteron) and on 64-bit Solaris 10. The 3 modified files are Modules/_hotshot.c, Lib/hotshot/log.py and Lib/hotshot/stats.py are attached. |
|||
| msg63224 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月03日 18:49 | |
Do *not* use the attached files. A fix is forthcoming. My apologies. |
|||
| msg63268 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月04日 23:52 | |
Attached are the improved hotspot files, rev 2. The changes are rather drastic, in particular since hires time delta's may exceed 32-bit int. These 3 files have been tested with Python 2.5.2 only and on 32-bit Linux and MacOS X and on 64-bit Linux and Solaris 10. They do pass the hotspot and other tests. However, no other platforms or compilers have been tested. Except for 64-bit PPC, the code should fall back to the previous behavior using gettimeofday. |
|||
| msg63373 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月08日 00:30 | |
Here is another version of the profiler files with 7 minor changes in the _hotshot.c file. Use this hires_version3 set, if any. |
|||
| msg63407 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月08日 21:05 | |
There are 7 other, potentially serious issues in the original _hotshot.c
file. All those are being fixed for the next version of the enhanced
hotshot files.
The 7 issues are:
1) functions flush_data and do_stop may create an infinite recursion on
line 567.
2) The pack_string and pack_add_info functions do not check for string
lengths exceeding BUFFERSIZE and may corrupt memory in that case.
3) In line 1182, linetimings should be frametimngs:
{"frametimings", T_LONG, offsetof(ProfilerObject, linetimings),
READONLY},
4) Coverage members frametimings, linetimings and lineevents are set on
line 1562 ff. after different values may have been written into the log
file header by function write_header on lines 1440 ff.
5) The coverage__doc__ on line 1546 is incomplete.
6) At several places, errors are detected but not reported and not sets.
7) An int value is passed where a long is specified or expected. T_LONG
should be T_INT on lines 1182-1184 and there are several calls to PyInt_FromLong with an int argument on line 487 ff. and other places.
|
|||
| msg63429 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月09日 22:45 | |
Attached is the latest, hopefully final version of the enhanced and improved hotshot profiler files. In addition to fixes for the 7 issues mentioned previously, type Py_ssize_t is used instead of size_t. Use this verion 4 and discard all previous ones. Please review this code in file _hotshot.c and let me know of any rule or guideline violations. I am more than happy to correct any mistakes. |
|||
| msg63485 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月12日 21:46 | |
Attached is yet another, final update of the enhancements to the hotshot profiler. It includes modifications of all 3 files, Modules/_hotshot.c, Lib/hotshot/log.py and Lib/hotshot/stats.py. |
|||
| msg64335 - (view) | Author: Jean Brouwers (MrJean1) | Date: 2008年03月22日 19:31 | |
Here are the forward diffs of the 3 files against the version in the trunk. |
|||
| msg74466 - (view) | Author: Fred Drake (fdrake) (Python committer) | Date: 2008年10月07日 17:55 | |
May I ask what the reasoning is for further developing hotshot as part of the core? My understanding, based on discussions on python-dev, is that hotshot is being deprecated in favor of cProfile. If hotshot still provides functionality that's interesting (and it may), perhaps it makes sense to maintain and improve it in a separate distribution. |
|||
| msg114614 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2010年08月21日 23:57 | |
hotshot won't get any more updates. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:31 | admin | set | github: 46471 |
| 2010年08月21日 23:57:05 | georg.brandl | set | status: open -> closed nosy: + georg.brandl messages: + msg114614 resolution: out of date |
| 2008年10月07日 17:55:39 | fdrake | set | messages: + msg74466 |
| 2008年10月07日 17:47:41 | MrJean1 | set | versions: + Python 2.7, - Python 2.5.3 |
| 2008年10月07日 17:41:47 | MrJean1 | set | versions: + Python 2.5.3, - Python 2.6 |
| 2008年05月25日 09:33:08 | gregory.p.smith | set | priority: normal nosy: + gregory.p.smith keywords: + patch |
| 2008年03月22日 19:31:30 | MrJean1 | set | files:
+ hires_hotshot_2.6.diffs.tgz messages: + msg64335 versions: + Python 2.6, - Python 2.5 |
| 2008年03月12日 21:46:50 | MrJean1 | set | files:
+ hires_hotshot5.tgz messages: + msg63485 |
| 2008年03月09日 22:45:16 | MrJean1 | set | files:
+ hires_hotshot4.tgz messages: + msg63429 |
| 2008年03月08日 21:05:30 | MrJean1 | set | messages: + msg63407 |
| 2008年03月08日 00:30:40 | MrJean1 | set | files:
+ hires_hotshot3.tgz messages: + msg63373 |
| 2008年03月04日 23:52:34 | MrJean1 | set | files:
+ hires_hotshot2.tgz messages: + msg63268 |
| 2008年03月03日 22:08:24 | benjamin.peterson | set | nosy: + fdrake |
| 2008年03月03日 18:49:54 | MrJean1 | set | messages: + msg63224 |
| 2008年03月02日 23:45:10 | MrJean1 | create | |