summaryrefslogtreecommitdiffstats
path: root/Modules/_hotshot.c
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-0/+4
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-15/+10
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Fix more ssize_t issues.Martin v. Löwis2006-04-221-1/+1
|
* Patch #1470300: Port _hotshot to QNX4.25 port.Martin v. Löwis2006-04-141-2/+2
|
* C++ compiler changes. casts, rename variables with reserved names.Anthony Baxter2006-04-131-2/+2
|
* _hotshot hotshot_profiler(): If write_header() returnedTim Peters2006-03-071-1/+3
| | | | | | | | | | | | | | | | an error code, this let `self` leak. This is a disaster on Windows, since `self` already points to a newly-opened file object, and it was impossible for Python code to close the thing since the only reference to it was in a blob of leaked C memory. test_hotshot test_bad_sys_path(): This new test provoked the C bug above. This test passed, but left an open "@test" file behind, which caused a massive cascade of bogus test failures in later, unrelated tests on Windows. Changed the test code to remove the @test file it leaves behind, which relies on the change above to close that file first.
* Thanks to Coverity, these were all reported by their Prevent tool.Neal Norwitz2006-03-071-0/+6
| | | | | All of these (except _lsprof.c) should be backported. Particularly the hotshot change which validates sys.path. Can someone backport?
* Merge ssize_t branch.Martin v. Löwis2006-02-151-9/+10
|
* Fix SF bug #1072182, problems with signed characters.Neal Norwitz2005-12-191-1/+1
| | | | Most of these can be backported.
* Nobody on python-dev seemed particularly bothered that Hotshot generates half-Armin Rigo2005-12-061-34/+2
| | | | meaningless numbers, but I figured out I would fix that bug anyway.
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+1
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* SF bug #808756: refleaks in _hotshot.c.Armin Rigo2004-08-031-2/+10
|
* SF patch #969180, hotshot incorrectly computes elapsed time by JasonNeal Norwitz2004-06-131-5/+7
| | | | | | | | | | | | | | | | | Beardsley. If the seconds are different, we still need to calculate the differences between milliseconds. Also, on a Gentoo Linux (2.6.5) dual Athlon MP box with glibc 2.3, time can go backwards. This probably happens when the process switches the CPU it's running on. Time can also go backwards when running NTP. If we detect a negative time delta (ie, time went backwards), return a delta of 0. This prevents an illegal array access elsewhere. I think it's safest to *not* update prev_timeofday in this case, so we return without updating. Backport candidate.
* Getting rid of all the code inside #ifdef macintosh too.Jack Jansen2003-11-201-6/+2
|
* Renamed PyObject_GenericGetIter to PyObject_SelfIterRaymond Hettinger2003-03-171-1/+1
| | | | | | to more accurately describe what the function does. Suggested by Thomas Wouters.
* Created PyObject_GenericGetIter().Raymond Hettinger2003-03-171-8/+1
| | | | Factors out the common case of returning self.
* Patch #661760: Cygwin auto-import module patchJason Tishler2003-01-061-4/+2
| | | | | | | | | | | | The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
* Patch #614055: Support OpenVMS.Martin v. Löwis2002-12-061-1/+2
|
* Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2.Martin v. Löwis2002-09-301-0/+2
|
* Patch #608999: Fix portability problems with MIPSPro 7.xMartin v. Löwis2002-09-191-0/+6
|
* Fix *really* embarrassing typo reported by Raymond Hettinger.Michael W. Hudson2002-09-111-1/+1
|
* A slight change to SET_LINENO-less tracing.Michael W. Hudson2002-09-111-4/+2
| | | | | This makes things a touch more like 2.2. Read the comments in Python/ceval.c for more details.
* This is my patchMichael W. Hudson2002-08-151-5/+8
| | | | | | | | [ 587993 ] SET_LINENO killer Remove SET_LINENO. Tracing is now supported by inspecting co_lnotab. Many sundry changes to document and adapt to this change.
* Patch #588561: Cygwin _hotshot patchJason Tishler2002-08-081-2/+4
| | | | | | YA Cygwin module patch very similar to other patches that I have submitted. I tested under Cygwin and Red Hat Linux 7.1.
* unpack_string(): avoid a compiler warning (about a real bug!) byGuido van Rossum2002-07-201-1/+4
| | | | | copying the result of fgetc() into an int variable before testing it for EOF.
* - When the log reader detects end-of-file, close the file.Fred Drake2002-07-181-45/+84
| | | | | | | | - The log reader now provides a "closed" attribute similar to the profiler. - Both the profiler and log reader now provide a fileno() method. - Use METH_NOARGS where possible, allowing simpler code in the method implementations.
* Mark the closed attribute of the profiler with PyDoc_STR(), and addedFred Drake2002-07-171-2/+3
| | | | a docstring for the info attribute of the logreader object.
* Added a docstring for the closed attribute.Fred Drake2002-07-171-4/+9
| | | | | | write_header(): When we encounter a non-string object in sys.path, record a fairly mindless placeholder rather than dying. Possibly could record the repr of the object found, but not clear whether that matters.
* Some modernization. Get rid of the redundant next() method. AlwaysGuido van Rossum2002-07-171-66/+37
| | | | | assume tp_iter and later fields exist. Use PyObject_GenericGetAttr instead of providing our own tp_getattr hook.
* Patch #569753: Remove support for WIN16.Martin v. Löwis2002-06-301-10/+10
| | | | Rename all occurrences of MS_WIN32 to MS_WINDOWS.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-30/+35
|
* The logreader object did not always refill the input buffer correctlyNeil Schemenauer2002-05-291-105/+56
| | | | | and got confused by certain log files. Remove logreader_refill and the associated logic and replace with fgetc.
* Remove compiler warnings on Solaris 8.Neal Norwitz2002-03-201-1/+1
| | | | Can go into 2.2.x, but not necessary.
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-2/+6
| | | | | | | | | | | | | | | Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
* Ensure we also build on VC7. Involves replacing largeint.h helper functions ↵Mark Hammond2002-02-121-1/+0
| | | | with msvc's native 64 bit integers.
* start() and stop() methods: return None where there is no exception;Fred Drake2002-02-081-2/+8
| | | | | returning NULL causes the interpreter to raise a SystemError. Noted by Anthony Baxter at Python 10.
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* Make sure to propogate errors that arise when profiling data cannot beFred Drake2001-12-041-71/+112
| | | | | written to the log file, and turn off the profiler. This closes SF bug #483925.
* sprintf -> PyOS_snprintf in some "obviously safe" cases.Tim Peters2001-11-281-8/+8
| | | | | Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
* Fix memory leak. This is (very!) similar to part of SF patch #478006.Fred Drake2001-11-091-0/+1
|
* Make the low-level log-reader object export a dictionary mapping keysFred Drake2001-10-291-45/+163
| | | | | | | | | | | | | | to lists of values, giving the contents of all the ADD_INFO records seen so far. This is initialized agressively when the log file is opened, so that whoever is looking at the log reader can always see the initial data loaded into the data stream. ADD_INFO events later in the log file continue to be reported to the application layer as before. Add a new method, addinfo(), to the profiler. This can be used to insert additional ADD_INFO records into the profiler log. Fix the tp_flags and tp_name slots on the type objects.
* Got this to work in MacPython. The code is #ifdef macintosh style (to match ↵Jack Jansen2001-10-231-2/+10
| | | | the existing #ifdef MS_WINDOWS), but eventually ifdeffing on configure features is probably better.
* Removed useless code to count the number of calls into the profiler.Fred Drake2001-10-151-51/+177
| | | | | | | | | | | Added support for saving the names of the functions observed into the profile log. Added support for using the profiler to measure coverage without collecting timing information (which is the slow part). Coverage logs can also be substantially smaller than profiling logs where per-line information is being collected. Updated comments on the log format; corrected record type values in some of the record descriptions.
* Speed the Windows code by using native 64-bit int compiler support insteadTim Peters2001-10-131-11/+14
| | | | of calling external functions.
* This compiles on Windows now.Tim Peters2001-10-131-0/+1
|
* My editor can't deal with long backslash-continued strings. Changed 'em.Tim Peters2001-10-131-48/+49
| | | | | This still doesn't compile on Windows, but at least I have a shot at fixing that now.
* Get hotshot closer to compiling on Windows.Tim Peters2001-10-121-3/+13
| | | | | Still broken: GETTIMEOFDAY. This macro obviously isn't being defined on Windows, so there's logic errors here I'd rather Fred untangled.
* The HotShot core: look, ma, no hands!Fred Drake2001-10-121-0/+1368