Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] python trace support for --debug mode
Date: Wed, 22 Mar 2006 08:18:07
Message-Id: 44210822.80403@gentoo.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hi everyone,
5
6 I've written a patch [1] that adds support for tracing python. It uses pythons debugger hooks [2] to trace execution events (mostly function calls and returns).
7
8 The patch causes python tracing to be enabled in --debug mode if "python-trace" is in features. This feature will be a useful troubleshooting tool, especially for problems occurring withing the python parts of portage that are reported by users but we are unable to reproduce locally. We can simply ask the user to do a --debug run with FEATURES="python-trace" and hopefully the resulting trace will give us the information necessary to diagnose the problem.
9
10 The trace output currently includes file name, line number, event type, and a dictionary of local variables. When the representation of a local variable is greater than a maximum number of characters (currently 200), the value of the variable is omitted in order to prevent the output from getting too large (hundreds of megabytes). With a minimal ebuild compilation and install, expect about 70MB of output that will compress to about 1.5MB with bzip2.
11
12 I'd like to merge this patch soon (by Friday, for release in 2.1_pre7). Feedback would be appreciated.
13
14 Zac
15
16 [1] http://dev.gentoo.org/~zmedico/portage/branches/2.1/patches/portage_debug/portage_debug.patch
17 [2] http://docs.python.org/lib/debugger-hooks.html
18
19 -----BEGIN PGP SIGNATURE-----
20 Version: GnuPG v1.4.2.2 (GNU/Linux)
21
22 iD8DBQFEIQgh/ejvha5XGaMRAt+aAJ9OLRx/PnqgP+gGlzWXetb76MQQXwCbBxWP
23 hibXI9uFbxc9Pz6Cki6xOLo=
24 =DrWx
25 -----END PGP SIGNATURE-----
26 --
27 gentoo-portage-dev@g.o mailing list