7788# telnetning <[email protected] >, 20189910- # Meng Du <[email protected] >, 20191110# dogn he <[email protected] >, 201911+ # Meng Du <[email protected] >, 20201212#
1313#, fuzzy
1414msgid ""
@@ -17,7 +17,7 @@ msgstr ""
1717"Report-Msgid-Bugs-To : \n "
1818"POT-Creation-Date : 2020-02-09 12:40+0000\n "
1919"PO-Revision-Date : 2017-02-16 17:45+0000\n "
20- "Last-Translator : dogn he <hedogn@163 .com>, 2019 \n "
20+ "Last-Translator : Meng Du <alphanow@gmail .com>, 2020 \n "
2121"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2222"MIME-Version : 1.0\n "
2323"Content-Type : text/plain; charset=UTF-8\n "
@@ -47,8 +47,7 @@ msgid ""
4747"what the processes on a computer system are doing. They both use domain-"
4848"specific languages allowing a user to write scripts which:"
4949msgstr ""
50- "DTrace和SystemTap是监视工具,每个工具都提供了一种检查计算机系统上的进程正在执行的操作的方法。 "
51- "它们都使用特定于域的语言,允许用户编写以下脚本:"
50+ "DTrace和SystemTap是监控工具,它们都提供了一种检查计算机系统上的进程的方法。 它们都使用特定领域的语言,允许用户编写脚本,其中:"
5251
5352#: ../../howto/instrumentation.rst:16
5453msgid "filter which processes are to be observed"
@@ -146,182 +145,194 @@ msgid ""
146145"function called \" start\" . In other words, import-time function invocations "
147146"are not going to be listed:"
148147msgstr ""
148+ "下面的 DTrace 脚本示例可以用来显示一个 Python 脚本的调用/返回层次结构,只在调用名为 \" start\" "
149+ "的函数内进行跟踪。换句话说,导入时的函数调用不会被列出。"
149150
150151#: ../../howto/instrumentation.rst:170 ../../howto/instrumentation.rst:228
151152msgid "It can be invoked like this::"
152- msgstr ""
153+ msgstr "它可以这样调用:: "
153154
154155#: ../../howto/instrumentation.rst:174 ../../howto/instrumentation.rst:234
155156msgid "The output looks like this:"
156157msgstr "输出结果会像这样:"
157158
158159#: ../../howto/instrumentation.rst:199
159160msgid "Static SystemTap markers"
160- msgstr ""
161+ msgstr "静态SystemTap标记 "
161162
162163#: ../../howto/instrumentation.rst:201
163164msgid ""
164165"The low-level way to use the SystemTap integration is to use the static "
165166"markers directly. This requires you to explicitly state the binary file "
166167"containing them."
167- msgstr ""
168+ msgstr "使用 SystemTap 集成的底层方法是直接使用静态标记。 这需要你显式地说明包含它们的二进制文件。 "
168169
169170#: ../../howto/instrumentation.rst:205
170171msgid ""
171172"For example, this SystemTap script can be used to show the call/return "
172173"hierarchy of a Python script:"
173- msgstr ""
174+ msgstr "例如,这个SystemTap脚本可以用来显示Python脚本的调用/返回层次结构: "
174175
175176#: ../../howto/instrumentation.rst:245
176177msgid "where the columns are:"
177- msgstr ""
178+ msgstr "其中的列是: "
178179
179180#: ../../howto/instrumentation.rst:247
180181msgid "time in microseconds since start of script"
181- msgstr ""
182+ msgstr "脚本开始后经过的微秒数 "
182183
183184#: ../../howto/instrumentation.rst:249
184185msgid "name of executable"
185- msgstr ""
186+ msgstr "可执行文件的名字 "
186187
187188#: ../../howto/instrumentation.rst:251
188189msgid "PID of process"
189- msgstr ""
190+ msgstr "进程的PID "
190191
191192#: ../../howto/instrumentation.rst:253
192193msgid ""
193194"and the remainder indicates the call/return hierarchy as the script "
194195"executes."
195- msgstr ""
196+ msgstr "其余部分则表示脚本执行时的调用/返回层次结构。 "
196197
197198#: ../../howto/instrumentation.rst:255
198199msgid ""
199200"For a `--enable-shared` build of CPython, the markers are contained within "
200201"the libpython shared library, and the probe's dotted path needs to reflect "
201202"this. For example, this line from the above example:"
202203msgstr ""
204+ "对于 `--enable-shared` "
205+ "构建的CPython来说,这些标记是包含在libpython共享库中的,探针的点状路径需要反映这一点。比如上面例子中的这一行:"
203206
204207#: ../../howto/instrumentation.rst:263
205208msgid "should instead read:"
206- msgstr ""
209+ msgstr "应改为: "
207210
208211#: ../../howto/instrumentation.rst:269
209212msgid "(assuming a debug build of CPython 3.6)"
210- msgstr ""
213+ msgstr "(假设是 CPython 3.6 的调试构建) "
211214
212215#: ../../howto/instrumentation.rst:273
213216msgid "Available static markers"
214- msgstr ""
217+ msgstr "可用的静态标记 "
215218
216219#: ../../howto/instrumentation.rst:279
217220msgid ""
218221"This marker indicates that execution of a Python function has begun. It is "
219222"only triggered for pure-Python (bytecode) functions."
220- msgstr ""
223+ msgstr "这个标记表示一个Python函数的执行已经开始。它只对纯 Python (字节码)函数触发。 "
221224
222225#: ../../howto/instrumentation.rst:282
223226msgid ""
224227"The filename, function name, and line number are provided back to the "
225228"tracing script as positional arguments, which must be accessed using "
226229"``$arg1``, ``$arg2``, ``$arg3``:"
227- msgstr ""
230+ msgstr "文件名、函数名和行号作为位置参数提供给跟踪脚本,必须使用 ``$arg1``, ``$arg2``, ``$arg3`` 访问: "
228231
229232#: ../../howto/instrumentation.rst:286
230233msgid ""
231234"``$arg1`` : ``(const char *)`` filename, accessible using "
232235"``user_string($arg1)``"
233- msgstr ""
236+ msgstr "``$arg1`` : ``(const char *)`` 文件名,使用 ``user_string($arg1)`` 访问 "
234237
235238#: ../../howto/instrumentation.rst:288
236239msgid ""
237240"``$arg2`` : ``(const char *)`` function name, accessible using "
238241"``user_string($arg2)``"
239- msgstr ""
242+ msgstr "``$arg2`` : ``(const char *)`` 函数名,使用 ``user_string($arg2)`` 访问 "
240243
241244#: ../../howto/instrumentation.rst:291
242245msgid "``$arg3`` : ``int`` line number"
243- msgstr ""
246+ msgstr "``$arg3`` : ``int`` 行号 "
244247
245248#: ../../howto/instrumentation.rst:295
246249msgid ""
247250"This marker is the converse of :c:func:`function__entry`, and indicates that"
248251" execution of a Python function has ended (either via ``return``, or via an "
249252"exception). It is only triggered for pure-Python (bytecode) functions."
250253msgstr ""
254+ "这个标记与 :c:func:`function__entry` 相反,表示Python函数的执行已经结束 (通过 ``return`` 或者异常)。 "
255+ "它只对纯Python (字节码) 函数触发。"
251256
252257#: ../../howto/instrumentation.rst:299
253258msgid "The arguments are the same as for :c:func:`function__entry`"
254- msgstr ""
259+ msgstr "参数和 :c:func:`function__entry` 相同 "
255260
256261#: ../../howto/instrumentation.rst:303
257262msgid ""
258263"This marker indicates a Python line is about to be executed. It is the "
259264"equivalent of line-by-line tracing with a Python profiler. It is not "
260265"triggered within C functions."
261- msgstr ""
266+ msgstr "这个标记表示一个 Python 行即将被执行。它相当于用 Python 分析器逐行追踪。它不会在C函数中触发。 "
262267
263268#: ../../howto/instrumentation.rst:307
264269msgid "The arguments are the same as for :c:func:`function__entry`."
265- msgstr ""
270+ msgstr "参数和 :c:func:`function__entry` 相同 "
266271
267272#: ../../howto/instrumentation.rst:311
268273msgid ""
269274"Fires when the Python interpreter starts a garbage collection cycle. "
270275"``arg0`` is the generation to scan, like :func:`gc.collect()`."
271- msgstr ""
276+ msgstr "当Python解释器启动一个垃圾回收循环时被触发。 ``arg0`` 是要扫描的生成器,如 :func:`gc.collect()`。 "
272277
273278#: ../../howto/instrumentation.rst:316
274279msgid ""
275280"Fires when the Python interpreter finishes a garbage collection cycle. "
276281"``arg0`` is the number of collected objects."
277- msgstr ""
282+ msgstr "当Python解释器完成一个垃圾回收循环时被触发。``arg0`` 是收集到的对象的数量。 "
278283
279284#: ../../howto/instrumentation.rst:321
280285msgid ""
281286"Fires before :mod:`importlib` attempts to find and load the module. ``arg0``"
282287" is the module name."
283- msgstr ""
288+ msgstr "在 :mod:`importlib` 试图查找并加载模块之前被触发。``arg0`` 是模块名称。 "
284289
285290#: ../../howto/instrumentation.rst:328
286291msgid ""
287292"Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is"
288293" the module name, ``arg1`` indicates if module was successfully loaded."
289294msgstr ""
295+ "在 :mod:`importlib` 的 find_and_load 函数被调用后被触发。 ``arg0`` 是模块名称, ``arg1`` "
296+ "表示模块是否成功加载。"
290297
291298#: ../../howto/instrumentation.rst:337
292299msgid ""
293300"Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is"
294301" the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a "
295302"tuple object."
296303msgstr ""
304+ "当 :func:`sys.audit` 或 :c:func:`PySys_Audit` 被调用时启动。 ``arg0`` 是事件名称的 C "
305+ "字符串,``arg1`` 是一个指向元组对象的 :c:type:`PyObject` 指针。"
297306
298307#: ../../howto/instrumentation.rst:345
299308msgid "SystemTap Tapsets"
300- msgstr ""
309+ msgstr "SystemTap Tapsets "
301310
302311#: ../../howto/instrumentation.rst:347
303312msgid ""
304313"The higher-level way to use the SystemTap integration is to use a "
305314"\" tapset\" : SystemTap's equivalent of a library, which hides some of the "
306315"lower-level details of the static markers."
307- msgstr ""
316+ msgstr "使用SystemTap集成的更高层次的方法是使用 \" tapset \" 。SystemTap 的等效库,它隐藏了静态标记的一些底层细节。 "
308317
309318#: ../../howto/instrumentation.rst:351
310319msgid "Here is a tapset file, based on a non-shared build of CPython:"
311- msgstr ""
320+ msgstr "这里是一个基于 CPython 的非共享构建的 tapset 文件。 "
312321
313322#: ../../howto/instrumentation.rst:374
314323msgid ""
315324"If this file is installed in SystemTap's tapset directory (e.g. "
316325"``/usr/share/systemtap/tapset``), then these additional probepoints become "
317326"available:"
318327msgstr ""
328+ "如果这个文件安装在 SystemTap 的 tapset 目录下(例如``/usr/share/systemtap/tapset`` "
329+ "),那么这些额外的探测点就会变得可用。"
319330
320331#: ../../howto/instrumentation.rst:380
321332msgid ""
322333"This probe point indicates that execution of a Python function has begun. It"
323334" is only triggered for pure-Python (bytecode) functions."
324- msgstr ""
335+ msgstr "这个探针点表示一个Python函数的执行已经开始。它只对纯Python (字节码)函数触发。 "
325336
326337#: ../../howto/instrumentation.rst:385
327338msgid ""
@@ -330,6 +341,8 @@ msgid ""
330341"``return``, or via an exception). It is only triggered for pure-Python "
331342"(bytecode) functions."
332343msgstr ""
344+ "这个探针点是 :c:func:`python.function.return` 的反义操作,表示一个Python函数的执行已经结束(通过 "
345+ "``return`` 或者异常)。 它只对纯Python (字节码)函数触发。"
333346
334347#: ../../howto/instrumentation.rst:392
335348msgid "Examples"
@@ -340,11 +353,11 @@ msgid ""
340353"This SystemTap script uses the tapset above to more cleanly implement the "
341354"example given above of tracing the Python function-call hierarchy, without "
342355"needing to directly name the static markers:"
343- msgstr ""
356+ msgstr "这个SystemTap脚本使用上面的tapset来更清晰地实现上面给出的跟踪Python函数调用层次结构的例子,而不需要直接命名静态标记。 "
344357
345358#: ../../howto/instrumentation.rst:412
346359msgid ""
347360"The following script uses the tapset above to provide a top-like view of all"
348361" running CPython code, showing the top 20 most frequently-entered bytecode "
349362"frames, each second, across the whole system:"
350- msgstr ""
363+ msgstr "下面的脚本使用上面的tapset提供了所有运行中的CPython代码的顶部视图,显示了整个系统中每一秒钟最频繁输入的前20个字节码帧。 "
0 commit comments