@@ -37,7 +37,7 @@ msgid ""
37
37
"that aid with the analysis of the data that it produces."
38
38
msgstr ""
39
39
"`Linux 性能分析器 (Linux perf profiler) <https://perf.wiki.kernel.org>`_ 是一"
40
- "個非常強大的工具,可讓你分析並獲取應用程式相關的性能資訊 。``perf`` 還擁有一個"
40
+ "個非常強大的工具,可讓你分析並獲取有關應用程式的性能資訊 。``perf`` 還擁有一個"
41
41
"非常活躍的工具生態系統,有助於分析其生成的資料。"
42
42
43
43
#: ../../howto/perf_profiling.rst:17
@@ -49,7 +49,7 @@ msgid ""
49
49
"output of ``perf``."
50
50
msgstr ""
51
51
"在 Python 應用程式中使用 ``perf`` 分析器的主要問題是 ``perf`` 僅獲取有關原生"
52
- "符號的資訊,即為用 C 編寫的函式和程序的名稱。這意味著程式碼中的 Python 函式名"
52
+ "符號的資訊,即用 C 編寫的函式和程式的名稱。這表示程式碼中的 Python 函式名"
53
53
"稱和檔案名稱不會出現在 ``perf`` 的輸出中。"
54
54
55
55
#: ../../howto/perf_profiling.rst:22
@@ -64,7 +64,7 @@ msgstr ""
64
64
"從 Python 3.12 開始,直譯器可以在特殊模式下運行,該模式允許 Python 函式出現"
65
65
"在 ``perf`` 分析器的輸出中。啟用此模式後,直譯器將在執行每個 Python 函式之前"
66
66
"插入 (interpose) 一小段動態編譯的程式碼,並使用 :doc:`perf map 檔案 <../c-"
67
- "api/perfmaps>`\\ 來教導 ``perf`` 這段程式碼與相關聯的 Python 函式間的關係。"
67
+ "api/perfmaps>`\\ 來告訴 ``perf`` 這段程式碼與相關聯的 Python 函式間的關係。"
68
68
69
69
#: ../../howto/per
10000
f_profiling.rst:31
70
70
msgid ""
@@ -73,7 +73,7 @@ msgid ""
73
73
"check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to "
74
74
"see if your system is supported."
75
75
msgstr ""
76
- "目前,對 ``perf`` 分析器的支援僅適用於 Linux 的特定架構上。檢查 "
76
+ "目前對 ``perf`` 分析器的支援僅適用於 Linux 的特定架構上。檢查 "
77
77
"``configure`` 建構步驟的輸出或檢查 ``python -m sysconfig | grep "
78
78
"HAVE_PERF_TRAMPOLINE`` 的輸出來查看你的系統是否支援。"
79
79
@@ -83,7 +83,7 @@ msgstr "例如,參考以下腳本:"
83
83
84
84
#: ../../howto/perf_profiling.rst:55
85
85
msgid "We can run ``perf`` to sample CPU stack traces at 9999 hertz::"
86
- msgstr "我們可以運行 ``perf`` 以 9999 赫茲採樣 CPU 堆疊追蹤 (stack trace): ::"
86
+ msgstr "我們可以執行 ``perf`` 以 9999 赫茲採樣 CPU 堆疊追蹤 (stack trace): ::"
87
87
88
88
#: ../../howto/perf_profiling.rst:59
89
89
msgid "Then we can use ``perf report`` to analyze the data:"
@@ -106,7 +106,7 @@ msgstr ""
106
106
msgid ""
107
107
"Instead, if we run the same experiment with ``perf`` support enabled we get:"
108
108
msgstr ""
109
- "相反地 ,如果我們在啟用 ``perf`` 支援的情況下運行相同的實驗 ,我們會得到:"
109
+ "作為替代 ,如果我們在啟用 ``perf`` 支援的情況下執行相同的實驗 ,我們會得到:"
110
110
111
111
#: ../../howto/perf_profiling.rst:152
112
112
msgid "How to enable ``perf`` profiling support"
@@ -162,13 +162,13 @@ msgid ""
162
162
msgstr ""
163
163
"為了獲得最佳結果,應使用 ``CFLAGS=\" -fno-omit-frame-pointer -mno-omit-leaf-"
164
164
"frame-pointer\" `` 來進行 Python 編譯,因為這能允許分析器僅使用 frame 指標而不"
165
- "是在 DWARF 上展開除錯資訊 。這是因為,由於插入以允許 ``perf`` 支援的程式碼是動"
165
+ "是 DWARF 除錯資訊來解析 (unwind) 。這是因為,由於插入以允許 ``perf`` 支援的程式碼是動"
166
166
"態生成的,因此它沒有任何可用的 DWARF 除錯資訊。"
167
167
168
168
#: ../../howto/perf_profiling.rst:201
169
169
msgid ""
170
170
"You can check if your system has been compiled with this flag by running::"
171
- msgstr "你可以透過運行以下指令來檢查你的系統是否已使用此旗標進行編譯 : ::"
171
+ msgstr "你可以透過執行以下指令來檢查你的系統是否已使用此旗標進行編譯 : ::"
172
172
173
173
#: ../../howto/perf_profiling.rst:205
174
174
msgid ""
0 commit comments