1- # SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023, Python Software Foundation
1+ # Copyright (C) 2001-2024, Python Software Foundation
32# This file is distributed under the same license as the Python package.
4- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
53#
6- #, fuzzy
4+ # Translators:
5+ # Matt Wang <mattwang44@gmail.com>, 2024
76msgid ""
87msgstr ""
98"Project-Id-Version :Python 3.12\n "
109"Report-Msgid-Bugs-To :\n "
1110"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 "
1515"Language :zh_TW\n "
1616"MIME-Version :1.0\n "
1717"Content-Type :text/plain; charset=UTF-8\n "
1818"Content-Transfer-Encoding :8bit\n "
1919
2020#: ../../c-api/perfmaps.rst:6
2121msgid "Support for Perf Maps"
22- msgstr ""
22+ msgstr "對 Perf Map 的支援 "
2323
2424#: ../../c-api/perfmaps.rst:8
2525msgid ""
@@ -32,18 +32,27 @@ msgid ""
3232"Perf tool <https://git.kernel.org/pub/scm/linux/ kernel/git/torvalds/linux."
3333"git/tree/tools/perf/Documentation/jit-interface.txt>`_."
3434msgstr ""
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+ "被描述。"
3542
3643#: ../../c-api/perfmaps.rst:16
3744msgid ""
3845"In Python, these helper APIs can be used by libraries and features that rely "
3946"on generating machine code on the fly."
4047msgstr ""
48+ "在 Python 中,這些輔助 API 可以被依賴於運行期間 (on the fly) 產生機器碼的函式庫和"
49+ "功能所使用。"
4150
4251#: ../../c-api/perfmaps.rst:19
4352msgid ""
4453"Note that holding the Global Interpreter Lock (GIL) is not required for "
4554"these APIs."
46- msgstr ""
55+ msgstr "請注意,這些 API 不需要持有全域直譯器鎖 (GIL)。 "
4756
4857#: ../../c-api/perfmaps.rst:23
4958msgid ""
@@ -54,26 +63,37 @@ msgid ""
5463"`PyUnstable_WritePerfMapEntry` and it will initialize the state on first "
5564"call."
5665msgstr ""
66+ "打開 ``/tmp/perf-$pid.map`` 檔案,除非它已經打開,並建立一個鎖以確保執行緒安"
67+ "全地 (thread-safe) 寫入該檔案(前提是寫入是透過 :c:func:"
68+ "`PyUnstable_WritePerfMapEntry` 完成的)。通常不需要明確地呼叫它;只需使用 :c:"
69+ "func:`PyUnstable_WritePerfMapEntry` 它就會在首次呼叫時初始化狀態。"
5770
5871#: ../../c-api/perfmaps.rst:29
5972msgid ""
6073"Returns ``0`` on success, ``-1`` on failure to create/open the perf map "
6174"file, or ``-2`` on failure to create a lock. Check ``errno`` for more "
6275"information about the cause of a failure."
6376msgstr ""
77+ "建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
78+ "傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"
6479
6580#: ../../c-api/perfmaps.rst:35
6681msgid ""
6782"Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is "
6883"thread safe. Here is what an example entry looks like::"
6984msgstr ""
85+ "將單一條目寫入 ``/tmp/perf-$pid.map`` 檔案。此函式是執行緒安全的。以下是一個"
86+ "條目的範例:"
7087
7188#: ../../c-api/perfmaps.rst:41
7289msgid ""
7390"Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, "
7491"if the perf map file is not already opened. Returns ``0`` on success, or the "
7592"same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure."
7693msgstr ""
94+ "如果尚未開啟 perf map 檔案,將在寫入條目之前呼叫 :c:func:"
95+ "`PyUnstable_PerfMapState_Init`。成功時回傳 ``0``,失敗時回傳與 :c:func:"
96+ "`PyUnstable_PerfMapState_Init` 失敗時相同的錯誤碼。"
7797
7898#: ../../c-api/perfmaps.rst:47
7999msgid ""
@@ -82,3 +102,6 @@ msgid ""
82102"general, there shouldn't be a reason to explicitly call this, except to "
83103"handle specific scenarios such as forking."
84104msgstr ""
105+ "關閉由 :c:func:`PyUnstable_PerfMapState_Init` 開啟的 perf map 檔案,這是在直"
106+ "譯器關閉期間由 runtime 本身呼叫的。一般來說,除了處理 forking 等特定場景外,"
107+ "不應該明確地呼叫它。"