2016-10-30 09:46:26 +00:00
|
|
|
# SOME DESCRIPTIVE TITLE.
|
|
|
|
# Copyright (C) 2001-2016, Python Software Foundation
|
|
|
|
# This file is distributed under the same license as the Python package.
|
|
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
|
|
#
|
|
|
|
#, fuzzy
|
|
|
|
msgid ""
|
|
|
|
msgstr ""
|
|
|
|
"Project-Id-Version: Python 3.6\n"
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2017-04-02 20:14:06 +00:00
|
|
|
"POT-Creation-Date: 2017-04-02 22:11+0200\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
2017-04-02 20:14:06 +00:00
|
|
|
"Language: \n"
|
2016-10-30 09:46:26 +00:00
|
|
|
"MIME-Version: 1.0\n"
|
|
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:7
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Instrumenting CPython with DTrace and SystemTap"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:9
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "David Malcolm"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:10
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Łukasz Langa"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:12
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"DTrace and SystemTap are monitoring tools, each providing a way to inspect "
|
|
|
|
"what the processes on a computer system are doing. They both use domain-"
|
|
|
|
"specific languages allowing a user to write scripts which:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:16
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "filter which processes are to be observed"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:17
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "gather data from the processes of interest"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:18
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "generate reports on the data"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:20
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"As of Python 3.6, CPython can be built with embedded \"markers\", also known "
|
|
|
|
"as \"probes\", that can be observed by a DTrace or SystemTap script, making "
|
|
|
|
"it easier to monitor what the CPython processes on a system are doing."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:27
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"DTrace markers are implementation details of the CPython interpreter. No "
|
|
|
|
"guarantees are made about probe compatibility between versions of CPython. "
|
|
|
|
"DTrace scripts can stop working or work incorrectly without warning when "
|
|
|
|
"changing CPython versions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:34
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Enabling the static markers"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:36
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"macOS comes with built-in support for DTrace. On Linux, in order to build "
|
|
|
|
"CPython with the embedded markers for SystemTap, the SystemTap development "
|
|
|
|
"tools must be installed."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:40
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "On a Linux machine, this can be done via::"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:44
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "or::"
|
|
|
|
msgstr "ou : ::"
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:49
|
|
|
|
msgid "CPython must then be configured ``--with-dtrace``:"
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:55
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"On macOS, you can list available DTrace probes by running a Python process "
|
|
|
|
"in the background and listing all probes made available by the Python "
|
|
|
|
"provider::"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:72
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"On Linux, you can verify if the SystemTap static markers are present in the "
|
|
|
|
"built binary by seeing if it contains a \".note.stapsdt\" section."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:80
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"If you've built Python as a shared library (with --enable-shared), you need "
|
2017-04-02 20:14:06 +00:00
|
|
|
"to look instead within the shared library. For example::"
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:86
|
|
|
|
msgid "Sufficiently modern readelf can print the metadata::"
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:123
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The above metadata contains information for SystemTap describing how it can "
|
|
|
|
"patch strategically-placed machine code instructions to enable the tracing "
|
|
|
|
"hooks used by a SystemTap script."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:129
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Static DTrace probes"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:131
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The following example DTrace script can be used to show the call/return "
|
|
|
|
"hierarchy of a Python script, only tracing within the invocation of a "
|
|
|
|
"function called \"start\". In other words, import-time function invocations "
|
|
|
|
"are not going to be listed:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:170 ../Doc/howto/instrumentation.rst:228
|
|
|
|
msgid "It can be invoked like this::"
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:174 ../Doc/howto/instrumentation.rst:234
|
|
|
|
msgid "The output looks like this:"
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:199
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Static SystemTap markers"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:201
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The low-level way to use the SystemTap integration is to use the static "
|
|
|
|
"markers directly. This requires you to explicitly state the binary file "
|
|
|
|
"containing them."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:205
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"For example, this SystemTap script can be used to show the call/return "
|
|
|
|
"hierarchy of a Python script:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:245
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "where the columns are:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:247
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "time in microseconds since start of script"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:249
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "name of executable"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:251
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "PID of process"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:253
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"and the remainder indicates the call/return hierarchy as the script executes."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:255
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"For a `--enable-shared` build of CPython, the markers are contained within "
|
|
|
|
"the libpython shared library, and the probe's dotted path needs to reflect "
|
|
|
|
"this. For example, this line from the above example::"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:261
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "should instead read::"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:265
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "(assuming a debug build of CPython 3.6)"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:269
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Available static markers"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:275
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This marker indicates that execution of a Python function has begun. It is "
|
|
|
|
"only triggered for pure-Python (bytecode) functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:278
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The filename, function name, and line number are provided back to the "
|
|
|
|
"tracing script as positional arguments, which must be accessed using ``"
|
|
|
|
"$arg1``, ``$arg2``, ``$arg3``:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:282
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"``$arg1`` : ``(const char *)`` filename, accessible using "
|
|
|
|
"``user_string($arg1)``"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:284
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"``$arg2`` : ``(const char *)`` function name, accessible using "
|
|
|
|
"``user_string($arg2)``"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:287
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "``$arg3`` : ``int`` line number"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:291
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This marker is the converse of :c:func:`function__entry`, and indicates that "
|
|
|
|
"execution of a Python function has ended (either via ``return``, or via an "
|
|
|
|
"exception). It is only triggered for pure-Python (bytecode) functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:295
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The arguments are the same as for :c:func:`function__entry`"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:299
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This marker indicates a Python line is about to be executed. It is the "
|
|
|
|
"equivalent of line-by-line tracing with a Python profiler. It is not "
|
|
|
|
"triggered within C functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:303
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The arguments are the same as for :c:func:`function__entry`."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:307
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Fires when the Python interpreter starts a garbage collection cycle. "
|
|
|
|
"``arg0`` is the generation to scan, like :func:`gc.collect()`."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:312
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Fires when the Python interpreter finishes a garbage collection cycle. "
|
|
|
|
"``arg0`` is the number of collected objects."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:317
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "SystemTap Tapsets"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:319
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The higher-level way to use the SystemTap integration is to use a \"tapset"
|
|
|
|
"\": SystemTap's equivalent of a library, which hides some of the lower-level "
|
|
|
|
"details of the static markers."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:323
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Here is a tapset file, based on a non-shared build of CPython:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:346
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/"
|
|
|
|
"systemtap/tapset``), then these additional probepoints become available:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:352
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This probe point indicates that execution of a Python function has begun. It "
|
|
|
|
"is only triggered for pure-python (bytecode) functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:357
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This probe point is the converse of :c:func:`python.function.return`, and "
|
|
|
|
"indicates that execution of a Python function has ended (either via "
|
|
|
|
"``return``, or via an exception). It is only triggered for pure-python "
|
|
|
|
"(bytecode) functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:364
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Examples"
|
|
|
|
msgstr "Exemples"
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:365
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This SystemTap script uses the tapset above to more cleanly implement the "
|
|
|
|
"example given above of tracing the Python function-call hierarchy, without "
|
|
|
|
"needing to directly name the static markers:"
|
|
|
|
msgstr ""
|
|
|
|
|
2017-04-02 20:14:06 +00:00
|
|
|
#: ../Doc/howto/instrumentation.rst:384
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The following script uses the tapset above to provide a top-like view of all "
|
|
|
|
"running CPython code, showing the top 20 most frequently-entered bytecode "
|
|
|
|
"frames, each second, across the whole system:"
|
|
|
|
msgstr ""
|