1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
---
title: Performance
slug: Mozilla/Performance
tags:
- NeedsTranslation
- Performance
- TopicStub
translation_of: Mozilla/Performance
---
<p>被連接到此的這篇文章將幫助你改進效能,不論你是開發 Mozilla 核心碼或附加元件。</p>
<table class="topicpage-table">
<tbody>
<tr>
<td>
<h3 id="Documentation">Documentation</h3>
<dl>
<dt><a href="/en/Performance/Reporting_a_Performance_Problem" title="en/Performance/Reporting_a_Performance_Problem">回報性能問題 Rorting a Performance Problem</a></dt>
<dd>對使用者友善的指導以報告性能問題。不需要開發環境。</dd>
<dt><a href="/en/Extensions/Performance_best_practices_in_extensions" title="en/Extensions/Performance best practices in extensions">性能最好的實踐在擴充元件中</a></dt>
<dd>給擴充元件開發者性能"最好的實踐"指引。</dd>
<dt><a href="/en/Performance/Measuring_add-on_startup_performance" title="en/Measuring Add-on Startup Performance">測量附加元件啟動效能</a></dt>
<dd>給附加元件開發者指引如何設定測試環境。</dd>
<dt><a href="/en/XUL_School/Appendix_A:_Add-on_Performance" title="en/XUL School/Appendix A: Add-on Performance">XUL School: 附加元件效能</a></dt>
<dd>給附加元件開發者提示去幫他們避免損害應用效能。</dd>
<dt><a href="/en/Performance/GPU_performance" title="en/GPU performance">GPU 效能</a></dt>
<dd>當使用GPU時給研究和改進效能的可靠建議</dd>
</dl>
<p><span class="alllinks"><a class="internal" href="/Special:Tags?tag=Performance" title="Special:Tags?tag=Performance">查看所有頁面以 "Performance" 標籤的...</a></span></p>
<h3 id="記憶體研究和漏洞偵測工具">記憶體研究和漏洞偵測工具</h3>
<dl>
<dt><a href="/en-US/docs/Mozilla/Performance/about:memory">about:memory</a></dt>
<dd>about:memory 是最輕巧使用工具給量測記憶體用量使用在 Mozilla 程式碼,且是最好出發地。它也讓你進行其他記憶體相關的操作像觸發垃圾回收 (GC) 和循環回收 (CC)、轉存 GC & CC 紀錄和轉存無效堆疊偵測 ( DMD) 報告。 about:memory 是建立在 Firefox's <a href="/en-US/docs/Mozilla/Performance/Memory_reporting">memory reporting</a> 構造上.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/DMD">DMD</a></dt>
<dd>無效堆疊偵測 (DMD) 是個可識別在about:memory中的量測值問題點,而且可以作各式各樣的一般堆疊研究。</dd>
<dt><a href="https://areweslimyet.com/">areweslimyet.com</a></dt>
<dd>areweslimyet.com (又名 AWSY) 是記憶體用和回歸偵測系統。</dd>
<dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Performance/BloatView">BloatView</a></dt>
<dd>BloatView 在配置和引用計數時列印按類別統計資料,且依類別提供記憶體中洩漏的分解總數目。它常用為 Mozilla持續整合測試的一部分。</dd>
<dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Refcount_tracing_and_balancing">引用計數追蹤與平衡 </a></dt>
<dd>引用計數追蹤與平衡是個手段要追蹤由引用計數不正確的使用造成的洩漏。 他們遲緩又不那麼容易使用,且因此大多數適合專家級開發者使用。</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/GC_and_CC_logs">GC and CC logs</a></dt>
<dd>觸發垃圾回收 (GC) 和循環回收 (CC)紀錄可被產生與分析以不同方式。特別是,他們能幫助瞭解為何特定勿建一直保持存在記憶體。</dd>
<dt><a href="/en-US/docs/Mozilla/Testing/Valgrind">Valgrind</a></dt>
<dd><a class="external text" href="http://valgrind.org/" rel="nofollow">Valgrind</a> 是個即時偵測種種記憶體相關的問題含洩漏的工具。 Valgrind 常作為Mozilla's持續整合測試的 <a class="external text" href="/en-US/docs/Valgrind_test_job" rel="nofollow">部份</a> ,雖然Valgrind的遲緩讓應用範圍受限。</dd>
<dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Firefox_and_Address_Sanitizer#LeakSanitizer">LeakSanitizer</a></dt>
<dd><span class="external text">LeakSanitizer</span> (又叫 LSAN) 相似於 Valgrind。 但它跑得快一些因為它使用靜態來源碼架構。LSAN常作為Mozilla's持續整合測試的一部分,雖然多數測試執行時它也是 AddressSanitizer (又叫 ASAN) 測試工作的一部分。</dd>
<dt><a href="http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html">Apple tools</a></dt>
<dd>Apple provides <span class="external text">some tools</span> for Mac OS X that report similar problems to those reported by LSAN and Valgrind. The "leaks" tool is not recommended for use with SpiderMonkey or Firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see <a class="external text" href="https://bugzilla.mozilla.org/show_bug.cgi?id=390944" rel="nofollow">bug 390944</a>).</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/Leak_Gauge">Leak Gauge</a></dt>
<dd>Leak Gauge is a tool that can be used to detect certain kinds of leaks in Gecko, including those involving documents, window objects, and docshells.</dd>
<dt><a href="http://dxr.mozilla.org/mozilla-central/source/memory/replace/logalloc/README">LogAlloc</a></dt>
<dd>LogAlloc is a tool that dumps a log of memory allocations in Gecko. That log can then be replayed against Firefox's default memory allocator independently or through another replace-malloc library, allowing the testing of other allocators under the exact same workload.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/Memory_Profiler">Memory Profiler</a></dt>
<dd>The memory profiler samples allocation events and provides different views to analyze the allocation characteristic.</dd>
</dl>
<p>See also the documentation on <a href="/en-US/docs/Mozilla/Performance/Leak-hunting_strategies_and_tips">Leak-hunting strategies and tips.</a></p>
</td>
<td>
<h3 id="Profiling_and_performance_tools">Profiling and performance tools</h3>
<dl>
<dt><a href="https://developer.mozilla.org/en-US/docs/Tools/Performance" title="en/Performance/Profiling with the Built-in Profiler">Profiling with the Developer Tools Profiler</a></dt>
<dd>The profiler built into the developer tools has a high-level waterfall, detailed call tree, allocations and GC profiling, and flame graphs. It is available on all platforms and release channels, and also supports remote profiling b2g and Fennec.</dd>
</dl>
<dl>
<dt><a href="/en/Performance/Profiling_with_the_Built-in_Profiler" title="en/Performance/Profiling with the Built-in Profiler">Profiling with the Gecko Profiler Addon</a> {{ gecko_minversion_inline("16.0") }}</dt>
<dd>The Gecko Profiler Addon is a good tool to start with.</dd>
<dt><a href="/en/Performance/Profiling_with_Instruments" title="en/Performance/Profiling with Instruments">Profiling with Instruments</a></dt>
<dd>How to use Apple's Instruments tool to profile Mozilla code.</dd>
<dt><a href="/en/Performance/Profiling_with_Xperf" title="en/Performance/Profiling with Xperf">Profiling with Xperf</a></dt>
<dd>How to use Microsoft's Xperf tool to profile Mozilla code.</dd>
<dt><a href="/en-US/docs/Performance/Profiling_with_Concurrency_Visualizer" title="en/Performance/Profiling with Concurrency Visualizer">Profiling with Concurrency Visualizer</a></dt>
<dd>How to use Visual Studio's Concurrency Visualizer tool to profile Mozilla code.</dd>
<dt><a href="/en/Performance/Profiling_with_Zoom" title="en/Performance/Profiling with Zoom">Profiling with Zoom</a></dt>
<dd>Zoom is a profiler for Linux done by the people who made Shark</dd>
<dt><a href="/en/Performance/Measuring_performance_using_the_PerfMeasurement.jsm_code_module" title="en/Performance/Measuring performance using the PerfMeasurement.jsm code module">Measuring performance using the PerfMeasurement.jsm code module</a> {{ gecko_minversion_inline("2.0") }}</dt>
<dd>Using <a href="/en/JavaScript_code_modules/PerfMeasurement.jsm" title="en/JavaScript code modules/PerfMeasurement.jsm"><code>PerfMeasurement.jsm</code></a> to measure performance data in your JavaScript code.</dd>
<dt><a href="/en-US/docs/Performance/Adding_a_new_Telemetry_probe" title="https://developer.mozilla.org/en-US/docs/Performance/Adding_a_new_Telemetry_probe">Adding a new Telemetry probe</a></dt>
<dd>Information on how to add a new measurement to the Telemetry performance-reporting system</dd>
<dt><a href="/en/Performance/Profiling_JavaScript_with_Shark" title="en/Performance/Profiling JavaScript with Shark">Profiling JavaScript with Shark</a> {{ gecko_minversion_inline("1.9") }}</dt>
<dd>How to use the Mac OS X Shark profiler to profile JavaScript code in Firefox 3.5 or later.</dd>
<dt><a href="/en/Performance/Profiling_with_Shark" title="en/Performance/Profiling with Shark">Profiling with Shark</a></dt>
<dd>How to use Apple's Shark tool to profile Mozilla code.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/Investigating_CSS_Performance">Investigating CSS Performance</a></dt>
<dd>How to figure out why restyle is taking so long</dd>
</dl>
<h3 id="Power_profiling">Power profiling</h3>
<dl>
<dt><a href="/en-US/docs/Mozilla/Performance/Power_profiling_overview">Power profiling overview</a></dt>
<dd>This page provides an overview of relevant information, including details about hardware, what can be measured, and recommended approaches. It should be the starting point for anybody new to power profiling.</dd>
<dt><code><a href="/en-US/docs/Mozilla/Performance/tools_power_rapl">tools/power/rapl</a></code> (Mac, Linux)</dt>
<dd><code>tools/power/rapl</code> is a command-line utility in the Mozilla codebase that uses the Intel RAPL interface to gather direct power estimates for the package, cores, GPU and memory.</dd>
<dt><code><a href="/en-US/docs/Mozilla/Performance/powermetrics">powermetrics</a></code> (Mac-only)</dt>
<dd><code>powermetrics</code> is a command-line utility that gathers and displays a wide range of global and per-process measurements, including CPU usage, GPU usage, and various wakeups frequencies.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/TimerFirings_logging">TimerFirings logging</a> (All platforms)</dt>
<dd>TimerFirings logging is a built-in logging mechanism that prints data on every time fired.</dd>
<dt><code><a href="/en-US/docs/Mozilla/Performance/dtrace">dtrace</a></code> (Mac-only)</dt>
<dd><code>dtrace</code> is a powerful kernel instrumentation tool. One of its many features is the ability to instrument wakeups in a high-context fashion.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/Activity_Monitor_and_top">Activity Monitor, Battery Status Menu and <code>top</code></a> (Mac-only)</dt>
<dd>The battery status menu, Activity Monitor and <code>top</code> are three related Mac tools that have major flaws but often consulted by users, and so are worth understanding.</dd>
<dt><a href="/en-US/docs/Mozilla/Performance/Intel_Power_Gadget">Intel Power Gadget</a> (Windows, Mac, Linux)</dt>
<dd>Intel Power Gadget provides real-time graphs for package and processor RAPL estimates. It also provides an API through which those estimates can be obtained.</dd>
<dt><code><a href="/en-US/docs/Mozilla/Performance/perf">perf</a></code> (Linux-only)</dt>
<dd><code>perf</code> is a powerful command-line utility that can measure many different things, including energy estimates and high-context measurements of things such as wakeups.</dd>
<dt><code><a href="/en-US/docs/Mozilla/Performance/turbostat">turbostat</a></code> (Linux-only)</dt>
<dd><code>turbostat</code> is a command-line utility that gathers and displays various power-related measurements, with a focus on per-CPU measurements such as frequencies and C-states.</dd>
<dt><code><a href="https://01.org/powertop">powertop</a></code> (Linux-only)</dt>
<dd><code>powertop</code> is an interactive command-line utility that gathers and displays various power-related measurements.</dd>
</dl>
<h3 id="Related_Topics">Related Topics</h3>
<dl>
<dd><a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>, <a href="/en/XPCOM" title="en/XPCOM">XPCOM</a>, <a href="/En/Developer_Guide" title="en/Developing_Mozilla">Developing Mozilla</a>, <a href="/en/Extensions" title="en/Extensions">Extensions</a>, <a href="/en/Addons" title="en/Addons">Addons</a></dd>
</dl>
</td>
</tr>
</tbody>
</table>
<p> </p>
|