[Python-checkins] CVS: python/dist/src/Modules _hotshot.c,1.2,1.3
Tim Peters
tim_one@users.sourceforge.net
Fri, 12 Oct 2001 17:11:12 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv13341/python/dist/src/Modules
Modified Files:
_hotshot.c
Log Message:
My editor can't deal with long backslash-continued strings. Changed 'em.
This still doesn't compile on Windows, but at least I have a shot at
fixing that now.
Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** _hotshot.c 2001/10/12 22:08:39 1.2
--- _hotshot.c 2001/10/13 00:11:10 1.3
***************
*** 15,19 ****
/*
* Which timer to use should be made more configurable, but that should not
! * be difficult. This will do fo now.
*/
#ifdef MS_WIN32
--- 15,19 ----
/*
* Which timer to use should be made more configurable, but that should not
! * be difficult. This will do for now.
*/
#ifdef MS_WIN32
***************
*** 22,25 ****
--- 22,26 ----
#include <direct.h> /* for getcwd() */
typedef LARGE_INTEGER hs_time;
+
#else
#ifndef HAVE_GETTIMEOFDAY
***************
*** 90,96 ****
/* The log reader... */
! static char logreader_close__doc__[] = "\
! close()\n\
! Close the log file, preventing additional records from being read.";
static PyObject *
--- 91,97 ----
/* The log reader... */
! static char logreader_close__doc__[] =
! "close()\n"
! "Close the log file, preventing additional records from being read.";
static PyObject *
***************
*** 454,460 ****
}
! static char next__doc__[] = "\
! next() -> event-info\n\
! Return the next event record from the log file.";
static PyObject *
--- 455,461 ----
}
! static char next__doc__[] =
! "next() -> event-info\n"
! "Return the next event record from the log file.";
static PyObject *
***************
*** 751,755 ****
#ifdef MS_WIN32
! static LARGE_INTEGER frequency = {0,0};
#endif
--- 752,756 ----
#ifdef MS_WIN32
! static LARGE_INTEGER frequency = {0, 0};
#endif
***************
*** 862,868 ****
/* Profiler object interface methods. */
! static char close__doc__[] = "\
! close()\n\
! Shut down this profiler and close the log files, even if its active.";
static PyObject *
--- 863,869 ----
/* Profiler object interface methods. */
! static char close__doc__[] =
! "close()\n"
! "Shut down this profiler and close the log files, even if its active.";
static PyObject *
***************
*** 883,889 ****
}
! static char runcall__doc__[] = "\
! runcall(callable[, args[, kw]]) -> callable()\n\
! Profile a specific function call, returning the result of that call.";
static PyObject *
--- 884,890 ----
}
! static char runcall__doc__[] =
! "runcall(callable[, args[, kw]]) -> callable()\n"
! "Profile a specific function call, returning the result of that call.";
static PyObject *
***************
*** 906,913 ****
}
! static char runcode__doc__[] = "\
! runcode(code, globals[, locals])\n\
! Execute a code object while collecting profile data. If locals is omitted,\n\
! globals is used for the locals as well.";
static PyObject *
--- 907,914 ----
}
! static char runcode__doc__[] =
! "runcode(code, globals[, locals])\n"
! "Execute a code object while collecting profile data. If locals is\n"
! "omitted, globals is used for the locals as well.";
static PyObject *
***************
*** 945,951 ****
}
! static char start__doc__[] = "\
! start()\n\
! Install this profiler for the current thread.";
static PyObject *
--- 946,952 ----
}
! static char start__doc__[] =
! "start()\n"
! "Install this profiler for the current thread.";
static PyObject *
***************
*** 961,967 ****
}
! static char stop__doc__[] = "\
! stop()\n\
! Remove this profiler from the current thread.";
static PyObject *
--- 962,968 ----
}
! static char stop__doc__[] =
! "stop()\n"
! "Remove this profiler from the current thread.";
static PyObject *
***************
*** 1036,1056 ****
! static char profiler_object__doc__[] = "\
! High-performance profiler object.\n\
! \n\
! Methods:\n\
! \n\
! close(): Stop the profiler and close the log files.\n\
! runcall(): Run a single function call with profiling enabled.\n\
! runcode(): Execute a code object with profiling enabled.\n\
! start(): Install the profiler and return.\n\
! stop(): Remove the profiler.\n\
! \n\
! Attributes (read-only):\n\
! \n\
! callcount: The number of low-level calls to the profiler.\n\
! closed: True if the profiler has already been closed.\n\
! lineevents: True if SET_LINENO events are reported to the profiler.\n\
! linetimings: True if SET_LINENO events collect timing information.";
static PyTypeObject ProfilerType = {
--- 1037,1057 ----
! static char profiler_object__doc__[] =
! "High-performance profiler object.\n"
! "\n"
! "Methods:\n"
! "\n"
! "close(): Stop the profiler and close the log files.\n"
! "runcall(): Run a single function call with profiling enabled.\n"
! "runcode(): Execute a code object with profiling enabled.\n"
! "start(): Install the profiler and return.\n"
! "stop(): Remove the profiler.\n"
! "\n"
! "Attributes (read-only):\n"
! "\n"
! "callcount: The number of low-level calls to the profiler.\n"
! "closed: True if the profiler has already been closed.\n"
! "lineevents: True if SET_LINENO events are reported to the profiler.\n"
! "linetimings: True if SET_LINENO events collect timing information.";
static PyTypeObject ProfilerType = {
***************
*** 1302,1313 ****
static char resolution__doc__[] =
#ifdef MS_WIN32
! "resolution() -> (performance-counter-ticks, update-frequency)\n\
! Return the resolution of the timer provided by the QueryPerformanceCounter()\n\
! function. The first value is the smallest observed change, and the second\n\
! if the result of QueryPerformanceFrequency().";
#else
! "resolution() -> (gettimeofday-usecs, getrusage-usecs)\n\
! Return the resolution of the timers provided by the gettimeofday() and\n\
! getrusage() system calls, or -1 if the call is not supported.";
#endif
--- 1303,1314 ----
static char resolution__doc__[] =
#ifdef MS_WIN32
! "resolution() -> (performance-counter-ticks, update-frequency)\n"
! "Return the resolution of the timer provided by the QueryPerformanceCounter()\n"
! "function. The first value is the smallest observed change, and the second\n"
! "is the result of QueryPerformanceFrequency().";
#else
! "resolution() -> (gettimeofday-usecs, getrusage-usecs)\n"
! "Return the resolution of the timers provided by the gettimeofday() and\n"
! "getrusage() system calls, or -1 if the call is not supported.";
#endif