[Patches] [ python-Patches-617311 ] Tiny profiling info (Psyco #2)
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 04 Oct 2002 03:42:39 -0700
Patches item #617311, was opened at 2002-10-01 23:20
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=617311&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Armin Rigo (arigo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Tiny profiling info (Psyco #2)
Initial Comment:
Psyco-friendly patch #2.
A very very small statistic-collecting patch.
pystate.h: added a field at the end of the
PyThreadStruct:
int tick_counter;
ceval.c: eval_frame():
tstate->tick_counter is incremented whenever the
check_interval ticker reaches zero.
The purpose is to give a useful measure of the number
of interpreted
bytecode instructions in a given thread. This
extremely lightweight
statistic collector can be of interest to profilers
(like psyco.jit()).
We can safely guess that a single integer increment
every 100
interpreted bytecode instructions will go entierely
unnoticed
in any performance measure. [This is true for
pystone.py.]
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2002-10-04 10:42
Message:
Logged In: YES
user_id=6656
I see no harm in this.
Are you sure it's actually going to be useful, though?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=617311&group_id=5470