1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2023, Python Software Foundation
1
+ # Copyright (C) 2001-2024, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
3
#
6
- #, fuzzy
4
+ # Translators:
5
+ # Matt Wang <mattwang44@gmail.com>, 2024
7
6
msgid ""
8
7
msgstr ""
9
8
"Project-Id-Version : Python 3.12\n "
10
9
"Report-Msgid-Bugs-To : \n "
11
10
"POT-Creation-Date : 2023-07-17 17:39+0800\n "
12
- "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13
- "Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
14
- "Language-Team : LANGUAGE <LL@li.org>\n "
11
+ "PO-Revision-Date : 2024-05-11 14:42+0800\n "
12
+ "Last-Translator : Matt Wang <mattwang44@gmail.com>\n "
13
+ "Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
+ "tw)\n "
15
15
"Language : zh_TW\n "
16
16
"MIME-Version : 1.0\n "
17
17
"Content-Type : text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding : 8bit\n "
19
19
20
20
#: ../../c-api/perfmaps.rst:6
21
21
msgid "Support for Perf Maps"
22
- msgstr ""
22
+ msgstr "對 Perf Map 的支援 "
23
23
24
24
#: ../../c-api/perfmaps.rst:8
25
25
msgid ""
@@ -32,18 +32,27 @@ msgid ""
32
32
"Perf tool <https://git.kernel.org/pub/scm/linux/ kernel/git/torvalds/linux."
33
33
"git/tree/tools/perf/Documentation/jit-interface.txt>`_."
34
34
msgstr ""
35
+ "在支援的平台上(截至撰寫本文時,僅限 Linux),runtime 可以利用 *perf map 檔案"
36
+ "*\\ 使得外部分析工具(例如 `perf <https://perf.wiki.kernel.org/index.php/"
37
+ "Main_Page>`_)可以見到 Python 函式。正在運行的行程可能會在 ``/tmp`` 目錄中建"
38
+ "立一個檔案,其中包含可以將一段可執行程式碼對映到名稱的各個條目。此介面在 "
39
+ "`Linux Perf 工具的文件 <https://git.kernel.org/pub/scm/linux/ kernel/git/"
40
+ "torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt>`_\\ 中有"
41
+ "被描述。"
35
42
36
43
#: ../../c-api/perfmaps.rst:16
37
44
msgid ""
38
45
"In Python, these helper APIs can be used by libraries and features that rely "
39
46
"on generating machine code on the fly."
40
47
msgstr ""
48
+ "在 Python 中,這些輔助 API 可以被依賴於運行期間 (on the fly) 產生機器碼的函式庫和"
49
+ "功能所使用。"
41
50
42
51
#: ../../c-api/perfmaps.rst:19
43
52
msgid ""
44
53
"Note that holding the Global Interpreter Lock (GIL) is not required for "
45
54
"these APIs."
46
- msgstr ""
55
+ msgstr "請注意,這些 API 不需要持有全域直譯器鎖 (GIL)。 "
47
56
48
57
#: ../../c-api/perfmaps.rst:23
49
58
msgid ""
@@ -54,26 +63,37 @@ msgid ""
54
63
"`PyUnstable_WritePerfMapEntry` and it will initialize the state on first "
55
64
"call."
56
65
msgstr ""
66
+ "打開 ``/tmp/perf-$pid.map`` 檔案,除非它已經打開,並建立一個鎖以確保執行緒安"
67
+ "全地 (thread-safe) 寫入該檔案(前提是寫入是透過 :c:func:"
68
+ "`PyUnstable_WritePerfMapEntry` 完成的)。通常不需要明確地呼叫它;只需使用 :c:"
69
+ "func:`PyUnstable_WritePerfMapEntry` 它就會在首次呼叫時初始化狀態。"
57
70
58
71
#: ../../c-api/perfmaps.rst:29
59
72
msgid ""
60
73
"Returns ``0`` on success, ``-1`` on failure to create/open the perf map "
61
74
"file, or ``-2`` on failure to create a lock. Check ``errno`` for more "
62
75
"information about the cause of a failure."
63
76
msgstr ""
77
+ "建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
78
+ "傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"
64
79
65
80
#: ../../c-api/perfmaps.rst:35
66
81
msgid ""
67
82
"Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is "
68
83
"thread safe. Here is what an example entry looks like::"
69
84
msgstr ""
85
+ "將單一條目寫入 ``/tmp/perf-$pid.map`` 檔案。此函式是執行緒安全的。以下是一個"
86
+ "條目的範例:"
70
87
71
88
#: ../../c-api/perfmaps.rst:41
72
89
msgid ""
73
90
"Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, "
74
91
"if the perf map file is not already opened. Returns ``0`` on success, or the "
75
92
"same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure."
76
93
msgstr ""
94
+ "如果尚未開啟 perf map 檔案,將在寫入條目之前呼叫 :c:func:"
95
+ "`PyUnstable_PerfMapState_Init`。成功時回傳 ``0``,失敗時回傳與 :c:func:"
96
+ "`PyUnstable_PerfMapState_Init` 失敗時相同的錯誤碼。"
77
97
78
98
#: ../../c-api/perfmaps.rst:47
79
99
msgid ""
@@ -82,3 +102,6 @@ msgid ""
82
102
"general, there shouldn't be a reason to explicitly call this, except to "
83
103
"handle specific scenarios such as forking."
84
104
msgstr ""
105
+ "關閉由 :c:func:`PyUnstable_PerfMapState_Init` 開啟的 perf map 檔案,這是在直"
106
+ "譯器關閉期間由 runtime 本身呼叫的。一般來說,除了處理 forking 等特定場景外,"
107
+ "不應該明確地呼叫它。"
0 commit comments