|
| 1 | +# SOME DESCRIPTIVE TITLE. |
| 2 | +# Copyright (C) 2001-2023, Python Software Foundation |
| 3 | +# This file is distributed under the same license as the Python package. |
| 4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 | +# |
| 6 | +# Translators: |
| 7 | +# Seweryn Piórkowski <[email protected]>, 2023 |
| 8 | +# |
| 9 | +#, fuzzy |
| 10 | +msgid "" |
| 11 | +msgstr "" |
| 12 | +"Project-Id-Version: Python 3.12\n" |
| 13 | +"Report-Msgid-Bugs-To: \n" |
| 14 | +"POT-Creation-Date: 2023-05-26 14:12+0000\n" |
| 15 | +"PO-Revision-Date: 2023-05-24 13:07+0000\n" |
| 16 | +" Last-Translator: Seweryn Piórkowski <[email protected]>, 2023\n" |
| 17 | +"Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n" |
| 18 | +"MIME-Version: 1.0\n" |
| 19 | +"Content-Type: text/plain; charset=UTF-8\n" |
| 20 | +"Content-Transfer-Encoding: 8bit\n" |
| 21 | +"Language: pl\n" |
| 22 | +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && " |
| 23 | +"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && " |
| 24 | +"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" |
| 25 | + |
| 26 | +msgid "Python support for the Linux ``perf`` profiler" |
| 27 | +msgstr "" |
| 28 | + |
| 29 | +msgid "author" |
| 30 | +msgstr "autor" |
| 31 | + |
| 32 | +msgid "Pablo Galindo" |
| 33 | +msgstr "" |
| 34 | + |
| 35 | +msgid "" |
| 36 | +"`The Linux perf profiler <https://perf.wiki.kernel.org>`_ is a very powerful " |
| 37 | +"tool that allows you to profile and obtain information about the performance " |
| 38 | +"of your application. ``perf`` also has a very vibrant ecosystem of tools " |
| 39 | +"that aid with the analysis of the data that it produces." |
| 40 | +msgstr "" |
| 41 | + |
| 42 | +msgid "" |
| 43 | +"The main problem with using the ``perf`` profiler with Python applications " |
| 44 | +"is that ``perf`` only gets information about native symbols, that is, the " |
| 45 | +"names of functions and procedures written in C. This means that the names " |
| 46 | +"and file names of Python functions in your code will not appear in the " |
| 47 | +"output of ``perf``." |
| 48 | +msgstr "" |
| 49 | + |
| 50 | +msgid "" |
| 51 | +"Since Python 3.12, the interpreter can run in a special mode that allows " |
| 52 | +"Python functions to appear in the output of the ``perf`` profiler. When this " |
| 53 | +"mode is enabled, the interpreter will interpose a small piece of code " |
| 54 | +"compiled on the fly before the execution of every Python function and it " |
| 55 | +"will teach ``perf`` the relationship between this piece of code and the " |
| 56 | +"associated Python function using :doc:`perf map files <../c-api/perfmaps>`." |
| 57 | +msgstr "" |
| 58 | + |
| 59 | +msgid "" |
| 60 | +"Support for the ``perf`` profiler is currently only available for Linux on " |
| 61 | +"select architectures. Check the output of the ``configure`` build step or " |
| 62 | +"check the output of ``python -m sysconfig | grep HAVE_PERF_TRAMPOLINE`` to " |
| 63 | +"see if your system is supported." |
| 64 | +msgstr "" |
| 65 | + |
| 66 | +msgid "For example, consider the following script:" |
| 67 | +msgstr "" |
| 68 | + |
| 69 | +msgid "We can run ``perf`` to sample CPU stack traces at 9999 hertz::" |
| 70 | +msgstr "" |
| 71 | + |
| 72 | +msgid "Then we can use ``perf report`` to analyze the data:" |
| 73 | +msgstr "" |
| 74 | + |
| 75 | +msgid "" |
| 76 | +"As you can see, the Python functions are not shown in the output, only " |
| 77 | +"``_Py_Eval_EvalFrameDefault`` (the function that evaluates the Python " |
| 78 | +"bytecode) shows up. Unfortunately that's not very useful because all Python " |
| 79 | +"functions use the same C function to evaluate bytecode so we cannot know " |
| 80 | +"which Python function corresponds to which bytecode-evaluating function." |
| 81 | +msgstr "" |
| 82 | + |
| 83 | +msgid "" |
| 84 | +"Instead, if we run the same experiment with ``perf`` support enabled we get:" |
| 85 | +msgstr "" |
| 86 | + |
| 87 | +msgid "How to enable ``perf`` profiling support" |
| 88 | +msgstr "" |
| 89 | + |
| 90 | +msgid "" |
| 91 | +"``perf`` profiling support can be enabled either from the start using the " |
| 92 | +"environment variable :envvar:`PYTHONPERFSUPPORT` or the :option:`-X perf <-" |
| 93 | +"X>` option, or dynamically using :func:`sys.activate_stack_trampoline` and :" |
| 94 | +"func:`sys.deactivate_stack_trampoline`." |
| 95 | +msgstr "" |
| 96 | + |
| 97 | +msgid "" |
| 98 | +"The :mod:`!sys` functions take precedence over the :option:`!-X` option, " |
| 99 | +"the :option:`!-X` option takes precedence over the environment variable." |
| 100 | +msgstr "" |
| 101 | + |
| 102 | +msgid "Example, using the environment variable::" |
| 103 | +msgstr "" |
| 104 | + |
| 105 | +msgid "Example, using the :option:`!-X` option::" |
| 106 | +msgstr "" |
| 107 | + |
| 108 | +msgid "Example, using the :mod:`sys` APIs in file :file:`example.py`:" |
| 109 | +msgstr "" |
| 110 | + |
| 111 | +msgid "...then::" |
| 112 | +msgstr "" |
| 113 | + |
| 114 | +msgid "How to obtain the best results" |
| 115 | +msgstr "" |
| 116 | + |
| 117 | +msgid "" |
| 118 | +"For best results, Python should be compiled with ``CFLAGS=\"-fno-omit-frame-" |
| 119 | +"pointer -mno-omit-leaf-frame-pointer\"`` as this allows profilers to unwind " |
| 120 | +"using only the frame pointer and not on DWARF debug information. This is " |
| 121 | +"because as the code that is interposed to allow ``perf`` support is " |
| 122 | +"dynamically generated it doesn't have any DWARF debugging information " |
| 123 | +"available." |
| 124 | +msgstr "" |
| 125 | + |
| 126 | +msgid "" |
| 127 | +"You can check if your system has been compiled with this flag by running::" |
| 128 | +msgstr "" |
| 129 | + |
| 130 | +msgid "" |
| 131 | +"If you don't see any output it means that your interpreter has not been " |
| 132 | +"compiled with frame pointers and therefore it may not be able to show Python " |
| 133 | +"functions in the output of ``perf``." |
| 134 | +msgstr "" |
0 commit comments