[Python-Dev] Dynamic bytecode analysis (original) (raw)

M.-A. Lemburg mal@lemburg.com
Thu, 27 Feb 2003 10:44:49 +0100


damien morton wrote:

Im not sure how I could properly excersise Zope, and Mailman doesn't run under windows. PySol is do-able. Any other suggestions as to apps worthy of profiling?

Anything with more than 10kloc Python code should do, I guess.

Would the python standard library unit tests qualify?

Nope :-)

-----Original Message----- From: M.-A. Lemburg [mailto:mal@lemburg.com] Sent: Thursday, 27 February 2003 03:41 To: Damien Morton Cc: python-dev@python.org Subject: Re: [Python-Dev] Dynamic bytecode analysis

Damien Morton wrote: So I enhanced the PVM dynamic execution profiler to keep track of quads of instructions rather than just pairs. Running it on PyStone, I get the following results: pystone is not your typical Python application. If you want some interesting data, I'd suggest to use applications like Zope, PySol, Mailman, etc. as basis. The easiest way to do this is by instrumenting the Python interpreter used by all these applications and have it write its data to a pickle every now and then. Here's an example from the Python 1.5 days: Opcode frequencies: -------------------------------------------------------------- ---------- SETLINENO(127) : 12036 ================================ LOADFAST(124) : 10366 =========================== LOADATTR(105) : 4565 ============ LOADCONST(100) : 4549 ============ POPTOP( 1) : 3756 ========= STOREFAST(125) : 3580 ========= CALLFUNCTION(131) : 2558 ====== JUMPIFFALSE(111) : 2142 ===== LOADGLOBAL(116) : 2056 ===== COMPAREOP(106) : 2001 ===== RETURNVALUE( 83) : 1593 ==== FORLOOP(114) : 1363 === BINARYADD( 23) : 1133 === STORENAME( 90) : 1062 == JUMPABSOLUTE(113) : 835 == MAKEFUNCTION(132) : 753 == SETUPLOOP(120) : 568 = POPBLOCK( 87) : 536 = JUMPFORWARD(110) : 503 = 32( 32) : 442 = JUMPIFTRUE(112) : 438 = LOADNAME(101) : 425 = DUPTOP( 4) : 421 = UNARYNEGATIVE( 11) : 411 = SETUPEXCEPT(121) : 410 = 31( 31) : 409 = -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Feb 27 2003) >>> Python/Zope Products & Consulting ... http://www.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/



Python UK 2003, Oxford: 33 days left EuroPython 2003, Charleroi, Belgium: 117 days left


Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

-- Marc-Andre Lemburg eGenix.com

Professional Python Software directly from the Source (#1, Feb 27 2003)

Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/


Python UK 2003, Oxford: 33 days left EuroPython 2003, Charleroi, Belgium: 117 days left