|
7 | 7 | msgstr ""
|
8 | 8 | "Project-Id-Version: Python 3.13\n"
|
9 | 9 | "Report-Msgid-Bugs-To: \n"
|
10 |
| -"POT-Creation-Date: 2025-03-29 00:14+0000\n" |
| 10 | +"POT-Creation-Date: 2025-04-19 00:14+0000\n" |
11 | 11 | "PO-Revision-Date: 2023-12-09 17:39+0800\n"
|
12 | 12 | " Last-Translator: Matt Wang <[email protected]>\n"
|
13 | 13 | "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
|
@@ -578,13 +578,55 @@ msgstr ""
|
578 | 578 |
|
579 | 579 | #: ../../howto/perf_profiling.rst:257
|
580 | 580 | msgid ""
|
581 |
| -"Notice that when using ``--call-graph dwarf`` the ``perf`` tool will take " |
582 |
| -"snapshots of the stack of the process being profiled and save the " |
583 |
| -"information in the ``perf.data`` file. By default the size of the stack dump " |
584 |
| -"is 8192 bytes but the user can change the size by passing the size after " |
585 |
| -"comma like ``--call-graph dwarf,4096``. The size of the stack dump is " |
586 |
| -"important because if the size is too small ``perf`` will not be able to " |
587 |
| -"unwind the stack and the output will be incomplete. On the other hand, if " |
588 |
| -"the size is too big, then ``perf`` won't be able to sample the process as " |
589 |
| -"frequently as it would like as the overhead will be higher." |
| 581 | +"When using ``--call-graph dwarf``, the ``perf`` tool will take snapshots of " |
| 582 | +"the stack of the process being profiled and save the information in the " |
| 583 | +"``perf.data`` file. By default, the size of the stack dump is 8192 bytes, " |
| 584 | +"but you can change the size by passing it after a comma like ``--call-graph " |
| 585 | +"dwarf,16384``." |
| 586 | +msgstr "" |
| 587 | + |
| 588 | +#: ../../howto/perf_profiling.rst:263 |
| 589 | +msgid "" |
| 590 | +"The size of the stack dump is important because if the size is too small " |
| 591 | +"``perf`` will not be able to unwind the stack and the output will be " |
| 592 | +"incomplete. On the other hand, if the size is too big, then ``perf`` won't " |
| 593 | +"be able to sample the process as frequently as it would like as the overhead " |
| 594 | +"will be higher." |
| 595 | +msgstr "" |
| 596 | + |
| 597 | +#: ../../howto/perf_profiling.rst:269 |
| 598 | +msgid "" |
| 599 | +"The stack size is particularly important when profiling Python code compiled " |
| 600 | +"with low optimization levels (like ``-O0``), as these builds tend to have " |
| 601 | +"larger stack frames. If you are compiling Python with ``-O0`` and not seeing " |
| 602 | +"Python functions in your profiling output, try increasing the stack dump " |
| 603 | +"size to 65528 bytes (the maximum)::" |
| 604 | +msgstr "" |
| 605 | + |
| 606 | +#: ../../howto/perf_profiling.rst:275 |
| 607 | +#, fuzzy |
| 608 | +msgid "" |
| 609 | +"$ perf record -F 9999 -g -k 1 --call-graph dwarf,65528 -o perf.data python -" |
| 610 | +"Xperf_jit my_script.py" |
| 611 | +msgstr "$ perf record -F 9999 -g -o perf.data python my_script.py" |
| 612 | + |
| 613 | +#: ../../howto/perf_profiling.rst:277 |
| 614 | +msgid "Different compilation flags can significantly impact stack sizes:" |
| 615 | +msgstr "" |
| 616 | + |
| 617 | +#: ../../howto/perf_profiling.rst:279 |
| 618 | +msgid "" |
| 619 | +"Builds with ``-O0`` typically have much larger stack frames than those with " |
| 620 | +"``-O1`` or higher" |
| 621 | +msgstr "" |
| 622 | + |
| 623 | +#: ../../howto/perf_profiling.rst:280 |
| 624 | +msgid "" |
| 625 | +"Adding optimizations (``-O1``, ``-O2``, etc.) typically reduces stack size" |
| 626 | +msgstr "" |
| 627 | + |
| 628 | +#: ../../howto/perf_profiling.rst:281 |
| 629 | +msgid "" |
| 630 | +"Frame pointers (``-fno-omit-frame-pointer``) generally provide more reliable " |
| 631 | +"stack unwinding" |
590 | 632 | msgstr ""
|
0 commit comments