Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Translatec-api/perfmaps.po#899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mattwang44 merged 2 commits intopython:3.12frommattwang44:c-api/perfmaps
Sep 11, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 32 additions & 9 deletionsc-api/perfmaps.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2023, Python Software Foundation
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
# Translators:
# Matt Wang <mattwang44@gmail.com>, 2024
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-17 17:39+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2024-05-11 14:42+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../../c-api/perfmaps.rst:6
msgid "Support for Perf Maps"
msgstr ""
msgstr "對 Perf Map 的支援"

#: ../../c-api/perfmaps.rst:8
msgid ""
Expand All@@ -32,18 +32,27 @@ msgid ""
"Perf tool <https://git.kernel.org/pub/scm/linux/ kernel/git/torvalds/linux."
"git/tree/tools/perf/Documentation/jit-interface.txt>`_."
msgstr ""
"在支援的平台上(截至撰寫本文時,僅限 Linux),runtime 可以利用 *perf map 檔案"
"*\\ 使得外部分析工具(例如 `perf <https://perf.wiki.kernel.org/index.php/"
"Main_Page>`_)可以見到 Python 函式。正在運行的行程可能會在 ``/tmp`` 目錄中建"
"立一個檔案,其中包含可以將一段可執行程式碼對映到名稱的各個條目。此介面在 "
"`Linux Perf 工具的文件 <https://git.kernel.org/pub/scm/linux/ kernel/git/"
"torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt>`_\\ 中有"
"被描述。"

#: ../../c-api/perfmaps.rst:16
msgid ""
"In Python, these helper APIs can be used by libraries and features that rely "
"on generating machine code on the fly."
msgstr ""
"在 Python 中,這些輔助 API 可以被依賴於運行期間 (on the fly) 產生機器碼的函式庫和"
"功能所使用。"

#: ../../c-api/perfmaps.rst:19
msgid ""
"Note that holding the Global Interpreter Lock (GIL) is not required for "
"these APIs."
msgstr ""
msgstr "請注意,這些 API 不需要持有全域直譯器鎖 (GIL)。"

#: ../../c-api/perfmaps.rst:23
msgid ""
Expand All@@ -54,26 +63,37 @@ msgid ""
"`PyUnstable_WritePerfMapEntry` and it will initialize the state on first "
"call."
msgstr ""
"打開 ``/tmp/perf-$pid.map`` 檔案,除非它已經打開,並建立一個鎖以確保執行緒安"
"全地 (thread-safe) 寫入該檔案(前提是寫入是透過 :c:func:"
"`PyUnstable_WritePerfMapEntry` 完成的)。通常不需要明確地呼叫它;只需使用 :c:"
"func:`PyUnstable_WritePerfMapEntry` 它就會在首次呼叫時初始化狀態。"

#: ../../c-api/perfmaps.rst:29
msgid ""
"Returns ``0`` on success, ``-1`` on failure to create/open the perf map "
"file, or ``-2`` on failure to create a lock. Check ``errno`` for more "
"information about the cause of a failure."
msgstr ""
"建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
"傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"

#: ../../c-api/perfmaps.rst:35
msgid ""
"Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is "
"thread safe. Here is what an example entry looks like::"
msgstr ""
"將單一條目寫入 ``/tmp/perf-$pid.map`` 檔案。此函式是執行緒安全的。以下是一個"
"條目的範例:"

#: ../../c-api/perfmaps.rst:41
msgid ""
"Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, "
"if the perf map file is not already opened. Returns ``0`` on success, or the "
"same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure."
msgstr ""
"如果尚未開啟 perf map 檔案,將在寫入條目之前呼叫 :c:func:"
"`PyUnstable_PerfMapState_Init`。成功時回傳 ``0``,失敗時回傳與 :c:func:"
"`PyUnstable_PerfMapState_Init` 失敗時相同的錯誤碼。"

#: ../../c-api/perfmaps.rst:47
msgid ""
Expand All@@ -82,3 +102,6 @@ msgid ""
"general, there shouldn't be a reason to explicitly call this, except to "
"handle specific scenarios such as forking."
msgstr ""
"關閉由 :c:func:`PyUnstable_PerfMapState_Init` 開啟的 perf map 檔案,這是在直"
"譯器關閉期間由 runtime 本身呼叫的。一般來說,除了處理 forking 等特定場景外,"
"不應該明確地呼叫它。"

[8]ページ先頭

©2009-2025 Movatter.jp