--- a/Objects/frameobject.c Mon Jul 02 13:54:33 2012 -0700 +++ b/Objects/frameobject.c Tue Jul 03 03:43:34 2012 +0200 @@ -714,6 +714,15 @@ f->f_lineno = code->co_firstlineno; f->f_iblock = 0; +#ifdef WITH_DTRACE + /* + ** Cache UTF8 internally, available + ** for the pythonframe stack walker. + */ + PyUnicode_AsUTF8(f->f_code->co_filename); + PyUnicode_AsUTF8(f->f_code->co_name); +#endif + _PyObject_GC_TRACK(f); return f; }