我使用Issue 13405修補了Python 2.7.3,然後使用--with-dtrace
配置選項編譯python。Python Dtrace已修補,但仍然運行測試腳本的「無效探針說明符」
當我運行test_dtrace腳本測試失敗與錯誤:
invalid probe specifier
,如下圖所示:
======================================================================
FAIL: test_function_entry_return (test_dtrace.DTraceTestsNormal)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dtrace.py", line 99, in test_function_entry_return
self.assertEqual(actual_result, expected_result)
AssertionError: 'dtrace: invalid probe specifier python*$target:::function-entry{ printf("Function entry %d ", timestamp);}python*$target:::function-entry,python*$target:::function-return{ printf("%d\t**%s*%s*%s*%d\\n", timestamp, probename, copyinstr(arg0), copyinstr(arg1), arg2);}python*$target:::function-return/(copyinstr(arg0)=="/Users/ramandeep/src/src/Python-2.7.3/dtrace_sample.py") &&(copyinstr(arg1)=="test_entry_return_and_stack")/{ self->trace = 0;}: probe description python*36447:::function-entry does not match any probes' != ...